qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Frank Chang <frank.chang@sifive.com>
To: Atish Patra <atishp@rivosinc.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Alistair Francis <alistair.francis@wdc.com>,
	 Anup Patel <anup.patel@wdc.com>,
	"open list:RISC-V" <qemu-riscv@nongnu.org>,
	dylan@rivosinc.com,  Bin Meng <bmeng.cn@gmail.com>,
	Jim Shu <jim.shu@sifive.com>
Subject: Re: [PATCH] hw/intc: Pass correct hartid while updating mtimecmp
Date: Sat, 14 May 2022 10:21:30 +0800	[thread overview]
Message-ID: <CAE_xrPiG6a1oH8UC1sr7cPqrJFQTMBHj+d-Tzs1TjaRtY2p2NA@mail.gmail.com> (raw)
In-Reply-To: <20220513221458.1192933-1-atishp@rivosinc.com>

[-- Attachment #1: Type: text/plain, Size: 1164 bytes --]

Reviewed-by: Frank Chang <frank.chang@sifive.com>

On Sat, May 14, 2022 at 6:15 AM Atish Patra <atishp@rivosinc.com> wrote:

> timecmp update function should be invoked with hartid for which
> timecmp is being updated. The following patch passes the incorrect
> hartid to the update function.
>
> Fixes: e2f01f3c2e13 ("hw/intc: Make RISC-V ACLINT mtime MMIO register
> writable")
>
> Signed-off-by: Atish Patra <atishp@rivosinc.com>
> ---
>  hw/intc/riscv_aclint.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c
> index 0412edc98257..e6bceceefdbc 100644
> --- a/hw/intc/riscv_aclint.c
> +++ b/hw/intc/riscv_aclint.c
> @@ -233,7 +233,8 @@ static void riscv_aclint_mtimer_write(void *opaque,
> hwaddr addr,
>                  continue;
>              }
>              riscv_aclint_mtimer_write_timecmp(mtimer, RISCV_CPU(cpu),
> -                                              i, env->timecmp);
> +                                              mtimer->hartid_base + i,
> +                                              env->timecmp);
>          }
>          return;
>      }
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 1765 bytes --]

  reply	other threads:[~2022-05-14  2:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13 22:14 [PATCH] hw/intc: Pass correct hartid while updating mtimecmp Atish Patra
2022-05-14  2:21 ` Frank Chang [this message]
2022-05-14  4:42 ` Anup Patel
2022-05-16 22:41 ` Alistair Francis
2022-05-16 23:10 ` 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=CAE_xrPiG6a1oH8UC1sr7cPqrJFQTMBHj+d-Tzs1TjaRtY2p2NA@mail.gmail.com \
    --to=frank.chang@sifive.com \
    --cc=alistair.francis@wdc.com \
    --cc=anup.patel@wdc.com \
    --cc=atishp@rivosinc.com \
    --cc=bmeng.cn@gmail.com \
    --cc=dylan@rivosinc.com \
    --cc=jim.shu@sifive.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).