From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-ppc@nongnu.org, David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH qemu v7 2/5] spapr/spapr: Make vty_getchars public
Date: Thu, 20 Feb 2020 17:16:19 +1100 [thread overview]
Message-ID: <20200220061622.15064-3-aik@ozlabs.ru> (raw)
In-Reply-To: <20200220061622.15064-1-aik@ozlabs.ru>
A serial device fetches the data from the chardev backend as soon as
input happens and stores it in its internal device specific buffer, every
char device implements it again. Since there is no unified interface to
read such buffer, we will have to read characters directly from
VIO_SPAPR_VTY_DEVICE. The OF client is going to need this.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
include/hw/ppc/spapr_vio.h | 1 +
hw/char/spapr_vty.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/hw/ppc/spapr_vio.h b/include/hw/ppc/spapr_vio.h
index bed7df60e35c..77e9b73bdfe0 100644
--- a/include/hw/ppc/spapr_vio.h
+++ b/include/hw/ppc/spapr_vio.h
@@ -130,6 +130,7 @@ int spapr_vio_send_crq(SpaprVioDevice *dev, uint8_t *crq);
SpaprVioDevice *vty_lookup(SpaprMachineState *spapr, target_ulong reg);
void vty_putchars(SpaprVioDevice *sdev, uint8_t *buf, int len);
+int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max);
void spapr_vty_create(SpaprVioBus *bus, Chardev *chardev);
void spapr_vlan_create(SpaprVioBus *bus, NICInfo *nd);
void spapr_vscsi_create(SpaprVioBus *bus);
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index ecb94f5673ca..1c00da75b4f1 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -52,7 +52,7 @@ static void vty_receive(void *opaque, const uint8_t *buf, int size)
}
}
-static int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max)
+int vty_getchars(SpaprVioDevice *sdev, uint8_t *buf, int max)
{
SpaprVioVty *dev = VIO_SPAPR_VTY_DEVICE(sdev);
int n = 0;
--
2.17.1
next prev parent reply other threads:[~2020-02-20 6:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 6:16 [PATCH qemu v7 0/5] spapr: Kill SLOF Alexey Kardashevskiy
2020-02-20 6:16 ` [PATCH qemu v7 1/5] ppc/spapr: Move GPRs setup to one place Alexey Kardashevskiy
2020-02-20 6:16 ` Alexey Kardashevskiy [this message]
2020-02-20 6:16 ` [PATCH qemu v7 3/5] spapr/cas: Separate CAS handling from rebuilding the FDT Alexey Kardashevskiy
2020-02-20 6:16 ` [PATCH qemu v7 4/5] spapr: Implement Open Firmware client interface Alexey Kardashevskiy
2020-02-20 6:16 ` [PATCH qemu v7 5/5] spapr/vof: Add basic support for MBR/GPT/GRUB Alexey Kardashevskiy
2020-02-20 10:01 ` [PATCH qemu v7 0/5] spapr: Kill SLOF Paolo Bonzini
2020-02-21 0:18 ` Alexey Kardashevskiy
2020-02-21 8:27 ` Paolo Bonzini
2020-02-25 23:58 ` Alexey Kardashevskiy
2020-02-26 11:34 ` Paolo Bonzini
2020-02-26 23:38 ` Alexey Kardashevskiy
2020-02-27 6:35 ` Paolo Bonzini
2020-03-06 1:17 ` Alexey Kardashevskiy
2020-03-06 8:25 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200220061622.15064-3-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).