From 77046729f943ce2055648e8339ddd688dd67dd83 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Fri, 13 May 2022 15:14:58 -0700 Subject: hw/intc: Pass correct hartid while updating mtimecmp 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 Reviewed-by: Frank Chang Reviewed-by: Anup Patel Reviewed-by: Alistair Francis Message-Id: <20220513221458.1192933-1-atishp@rivosinc.com> Signed-off-by: Alistair Francis --- hw/intc/riscv_aclint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/intc') diff --git a/hw/intc/riscv_aclint.c b/hw/intc/riscv_aclint.c index 0412edc..e6bcece 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; } -- cgit v1.1