From: Jason Chien <jason.chien@sifive.com>
To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org
Cc: Jason Chien <jason.chien@sifive.com>,
Anup Patel <apatel@ventanamicro.com>,
Alistair Francis <alistair.francis@wdc.com>,
Andrew Jones <ajones@ventanamicro.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Subject: [PATCH 2/2] hw/intc: Make rtc variable names consistent
Date: Fri, 28 Jul 2023 08:24:39 +0000 [thread overview]
Message-ID: <20230728082502.26439-2-jason.chien@sifive.com> (raw)
In-Reply-To: <20230728082502.26439-1-jason.chien@sifive.com>
The variables whose values are given by cpu_riscv_read_rtc() should be named
"rtc". The variables whose value are given by cpu_riscv_read_rtc_raw()
should be named "rtc_r".
Signed-off-by: Jason Chien <jason.chien@sifive.com>
---
hw/intc/riscv_aclint.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c
index bf77e29a70..25cf7a5d9d 100644
--- a/hw/intc/riscv_aclint.c
+++ b/hw/intc/riscv_aclint.c
@@ -64,13 +64,13 @@ static void riscv_aclint_mtimer_write_timecmp(RISCVAclintMTimerState *mtimer,
uint64_t next;
uint64_t diff;
- uint64_t rtc_r = cpu_riscv_read_rtc(mtimer);
+ uint64_t rtc = cpu_riscv_read_rtc(mtimer);
/* Compute the relative hartid w.r.t the socket */
hartid = hartid - mtimer->hartid_base;
mtimer->timecmp[hartid] = value;
- if (mtimer->timecmp[hartid] <= rtc_r) {
+ if (mtimer->timecmp[hartid] <= rtc) {
/*
* If we're setting an MTIMECMP value in the "past",
* immediately raise the timer interrupt
@@ -81,7 +81,7 @@ static void riscv_aclint_mtimer_write_timecmp(RISCVAclintMTimerState *mtimer,
/* otherwise, set up the future timer interrupt */
qemu_irq_lower(mtimer->timer_irqs[hartid]);
- diff = mtimer->timecmp[hartid] - rtc_r;
+ diff = mtimer->timecmp[hartid] - rtc;
/* back to ns (note args switched in muldiv64) */
uint64_t ns_diff = muldiv64(diff, NANOSECONDS_PER_SECOND, timebase_freq);
--
2.17.1
next prev parent reply other threads:[~2023-07-28 8:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 8:24 [PATCH 1/2] hw/intc: Fix upper/lower mtime write calculation Jason Chien
2023-07-28 8:24 ` Jason Chien [this message]
2023-08-08 18:40 ` [PATCH 2/2] hw/intc: Make rtc variable names consistent Jason Chien
2023-08-10 18:24 ` Alistair Francis
2023-08-21 16:15 ` Jason Chien
2023-08-21 17:52 ` Alistair Francis
2023-08-23 8:04 ` Jason Chien
2023-08-08 18:41 ` [PATCH 1/2] hw/intc: Fix upper/lower mtime write calculation Jason Chien
2023-08-10 18:23 ` Alistair Francis
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=20230728082502.26439-2-jason.chien@sifive.com \
--to=jason.chien@sifive.com \
--cc=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=apatel@ventanamicro.com \
--cc=dbarboza@ventanamicro.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@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).