Merge tag 'timers-core-2024-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-block.git] / drivers / clocksource / timer-riscv.c
index 87a7ac0ce6cec46e4b00fa06a90402f4e2ced9de..48ce50c5f5e68eeec9de696476d424dd5b2c00d0 100644 (file)
@@ -108,6 +108,9 @@ static int riscv_timer_starting_cpu(unsigned int cpu)
 {
        struct clock_event_device *ce = per_cpu_ptr(&riscv_clock_event, cpu);
 
+       /* Clear timer interrupt */
+       riscv_clock_event_stop();
+
        ce->cpumask = cpumask_of(cpu);
        ce->irq = riscv_clock_event_irq;
        if (riscv_timer_cannot_wake_cpu)