qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: [PULL 05/16] rust: pl011: Rename RX FIFO methods
Date: Mon, 12 May 2025 21:05:13 +0200	[thread overview]
Message-ID: <20250512190524.179419-6-pbonzini@redhat.com> (raw)
In-Reply-To: <20250512190524.179419-1-pbonzini@redhat.com>

In preparation of having a TX FIFO, rename the RX FIFO methods.
This is the Rust version of commit 40871ca758cf ("hw/char/pl011:
Rename RX FIFO methods").

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rust/hw/char/pl011/src/device.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs
index 7c563ade9cd..94b31659849 100644
--- a/rust/hw/char/pl011/src/device.rs
+++ b/rust/hw/char/pl011/src/device.rs
@@ -329,7 +329,7 @@ fn loopback_tx(&mut self, value: registers::Data) -> bool {
         // hardware flow-control is enabled.
         //
         // For simplicity, the above described is not emulated.
-        self.loopback_enabled() && self.put_fifo(value)
+        self.loopback_enabled() && self.fifo_rx_put(value)
     }
 
     #[must_use]
@@ -439,7 +439,7 @@ pub fn fifo_depth(&self) -> u32 {
     }
 
     #[must_use]
-    pub fn put_fifo(&mut self, value: registers::Data) -> bool {
+    pub fn fifo_rx_put(&mut self, value: registers::Data) -> bool {
         let depth = self.fifo_depth();
         assert!(depth > 0);
         let slot = (self.read_pos + self.read_count) & (depth - 1);
@@ -589,7 +589,7 @@ fn receive(&self, buf: &[u8]) {
         }
         let mut regs = self.regs.borrow_mut();
         let c: u32 = buf[0].into();
-        let update_irq = !regs.loopback_enabled() && regs.put_fifo(c.into());
+        let update_irq = !regs.loopback_enabled() && regs.fifo_rx_put(c.into());
         // Release the BqlRefCell before calling self.update()
         drop(regs);
 
@@ -602,7 +602,7 @@ fn event(&self, event: Event) {
         let mut update_irq = false;
         let mut regs = self.regs.borrow_mut();
         if event == Event::CHR_EVENT_BREAK && !regs.loopback_enabled() {
-            update_irq = regs.put_fifo(registers::Data::BREAK);
+            update_irq = regs.fifo_rx_put(registers::Data::BREAK);
         }
         // Release the BqlRefCell before calling self.update()
         drop(regs);
-- 
2.49.0



  parent reply	other threads:[~2025-05-12 19:07 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 19:05 [PULL 00/16] Meson, x86, Rust patches for 2025-05-12 Paolo Bonzini
2025-05-12 19:05 ` [PULL 01/16] meson: drop --enable-avx* options Paolo Bonzini
2025-05-12 19:05 ` [PULL 02/16] meson: do not check supported TCG architecture if no emulators built Paolo Bonzini
2025-05-12 19:05 ` [PULL 03/16] meson: remove unnecessary dependencies from specific_ss Paolo Bonzini
2025-05-12 19:05 ` [PULL 04/16] modinfo: lookup compile_commands.json by object Paolo Bonzini
2025-05-12 19:05 ` Paolo Bonzini [this message]
2025-05-12 19:05 ` [PULL 06/16] rust: pl011: Really use RX FIFO depth Paolo Bonzini
2025-05-12 19:05 ` [PULL 07/16] target/i386: ignore misplaced REX prefixes Paolo Bonzini
2025-05-12 19:05 ` [PULL 08/16] target/i386: list TCG-supported features for CPUID[80000021h].EAX Paolo Bonzini
2025-05-12 19:05 ` [PULL 09/16] target/i386: move push of error code to switch_tss_ra Paolo Bonzini
2025-05-12 19:05 ` [PULL 10/16] target/i386: implement TSS trap bit Paolo Bonzini
2025-09-10  5:50   ` Thomas Huth
2025-09-10  8:01     ` Mark Cave-Ayland
2025-09-10  9:07       ` Thomas Huth
2025-05-12 19:05 ` [PULL 11/16] target/i386/emulate: stop overloading decode->op[N].ptr Paolo Bonzini
2025-05-12 19:05 ` [PULL 12/16] target/i386/emulate: mostly rewrite flags handling Paolo Bonzini
2025-05-12 19:05 ` [PULL 13/16] target/i386: remove lflags Paolo Bonzini
2025-05-12 19:05 ` [PULL 14/16] linux-headers: update from 6.15 + kvm/next Paolo Bonzini
2025-05-12 19:05 ` [PULL 15/16] hw/audio/cs4231a: fix assertion error in isa_bus_get_irq Paolo Bonzini
2025-05-12 19:05 ` [PULL 16/16] target/i386: Make ITS_NO available to guests Paolo Bonzini
2025-05-14 13:18 ` [PULL 00/16] Meson, x86, Rust patches for 2025-05-12 Stefan Hajnoczi

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=20250512190524.179419-6-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@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).