From: Andrew Jones <andrew.jones@linux.dev>
To: Thomas Huth <thuth@redhat.com>
Cc: Alexandru Elisei <alexandru.elisei@arm.com>,
Eric Auger <eric.auger@redhat.com>,
kvm@vger.kernel.org, Nicholas Piggin <npiggin@gmail.com>,
kvmarm@lists.linux.dev
Subject: Re: [kvm-unit-tests PATCH] lib/arm/io: Fix calling getchar() multiple times
Date: Wed, 21 Feb 2024 08:42:03 +0100 [thread overview]
Message-ID: <20240221-499d5537872c9fc9de5a5dea@orel> (raw)
In-Reply-To: <20240216140210.70280-1-thuth@redhat.com>
On Fri, Feb 16, 2024 at 03:02:10PM +0100, Thomas Huth wrote:
> getchar() can currently only be called once on arm since the implementation
> is a little bit too naïve: After the first character has arrived, the
> data register never gets set to zero again. To properly check whether a
> byte is available, we need to check the "RX fifo empty" on the pl011 UART
> or the "RX data ready" bit on the ns16550a UART instead.
>
> With this proper check in place, we can finally also get rid of the
> ugly assert(count < 16) statement here.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> lib/arm/io.c | 34 ++++++++++++++--------------------
> 1 file changed, 14 insertions(+), 20 deletions(-)
>
Acked-by: Andrew Jones <andrew.jones@linux.dev>
prev parent reply other threads:[~2024-02-21 7:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 14:02 [kvm-unit-tests PATCH] lib/arm/io: Fix calling getchar() multiple times Thomas Huth
2024-02-17 10:43 ` Nicholas Piggin
2024-02-19 6:59 ` Thomas Huth
2024-02-19 11:58 ` Nicholas Piggin
2024-02-19 13:46 ` Andrew Jones
2024-02-17 14:28 ` Nicholas Piggin
2024-02-19 14:22 ` Andrew Jones
2024-02-19 16:56 ` Alexandru Elisei
2024-02-20 1:37 ` Nicholas Piggin
2024-02-20 8:51 ` Nicholas Piggin
2024-02-20 10:22 ` Alexandru Elisei
2024-02-21 3:39 ` Nicholas Piggin
2024-02-21 7:42 ` Andrew Jones [this message]
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=20240221-499d5537872c9fc9de5a5dea@orel \
--to=andrew.jones@linux.dev \
--cc=alexandru.elisei@arm.com \
--cc=eric.auger@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=npiggin@gmail.com \
--cc=thuth@redhat.com \
/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