Skip to content

Commit 70c93b0

Browse files
nick650823Alexandre Ghiti
authored andcommitted
clocksource/drivers/timer-riscv: Stop stimecmp when cpu hotplug
Stop the timer when the cpu is going to be offline otherwise the timer interrupt may be pending while performing power-down. Suggested-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/T/#u Signed-off-by: Nick Hu <[email protected]> Reviewed-by: Anup Patel <[email protected]> Acked-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexandre Ghiti <[email protected]>
1 parent ffef54a commit 70c93b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/clocksource/timer-riscv.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,13 @@ static int riscv_timer_starting_cpu(unsigned int cpu)
126126

127127
static int riscv_timer_dying_cpu(unsigned int cpu)
128128
{
129+
/*
130+
* Stop the timer when the cpu is going to be offline otherwise
131+
* the timer interrupt may be pending while performing power-down.
132+
*/
133+
riscv_clock_event_stop();
129134
disable_percpu_irq(riscv_clock_event_irq);
135+
130136
return 0;
131137
}
132138

0 commit comments

Comments
 (0)