Skip to content

Commit

Permalink
hw/intc: Pass correct hartid while updating mtimecmp
Browse files Browse the repository at this point in the history
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: e2f01f3 ("hw/intc: Make RISC-V ACLINT mtime MMIO register writable")

Signed-off-by: Atish Patra <atishp@rivosinc.com>
Reviewed-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20220513221458.1192933-1-atishp@rivosinc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
  • Loading branch information
atishp04 authored and alistair23 committed May 23, 2022
1 parent 02b5119 commit 7704672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hw/intc/riscv_aclint.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7704672

Please sign in to comment.