target/arm: trigger timer recalculation when toggling CNTHCTL:ECV
When toggling the state of ECV we affect the offset applied to timers. As a result we should trigger a recalculation of the timer value to take into account the new offset. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 20260624124527.1018912-3-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Alex Bennée committed
Jun 24, 2026 at 13:45 UTC
c94fa50ede75489893a1549917b9d0cc6f4a94b6
1 file changed
+3
target/arm/helper.c
+3
@@ -1806,6 +1806,9 @@ static void gt_cnthctl_write(CPUARMState *env, const ARMCPRegInfo *ri,
1806
if ((oldval ^ value) & R_CNTHCTL_CNTPMASK_MASK) {
1807
gt_update_irq(cpu, GTIMER_PHYS);
1808
}
1809
+ if ((oldval ^ value) & R_CNTHCTL_ECV_MASK) {
1810
+ gt_recalc_timer(cpu, GTIMER_PHYS);
1811
+ }
1812
}
1813
1814
static void gt_cntvoff_write(CPUARMState *env, const ARMCPRegInfo *ri,