Commit c75b41f21f for qemu.org
commit c75b41f21f1f7c9266d80220a2fa70f499f64a87
Author: Alistair Francis <alistair.francis@wdc.com>
Date: Tue Apr 7 14:36:13 2026 +1000
hw/timer: ibex_timer: Update IRQs after writing CTRL
When writing to rv_timer.CTRL after setting the compare values the timer
doesn't fire as we don't update the interrupts. Ensure we update the
interrupts after a write to the rv_timer.CTRL register.
Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/2796
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Reviewed-by: Nutty Liu <nutty.liu@hotmail.com>
Message-ID: <20260407043614.372871-5-alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff --git a/hw/timer/ibex_timer.c b/hw/timer/ibex_timer.c
index 0f12531934..571633803d 100644
--- a/hw/timer/ibex_timer.c
+++ b/hw/timer/ibex_timer.c
@@ -193,6 +193,7 @@ static void ibex_timer_write(void *opaque, hwaddr addr,
break;
case R_CTRL:
s->timer_ctrl = val;
+ ibex_timer_update_irqs(s);
break;
case R_CFG0:
qemu_log_mask(LOG_UNIMP, "Changing prescale or step not supported");