Skip to content

Commit 232ccac

Browse files
smaeuldlezcano
authored andcommitted
clocksource/drivers/riscv: Events are stopped during CPU suspend
Some implementations of the SBI time extension depend on hart-local state (for example, CSRs) that are lost or hardware that is powered down when a CPU is suspended. To be safe, the clockevents driver cannot assume that timer IRQs will be received during CPU suspend. Fixes: 62b0194 ("clocksource: new RISC-V SBI timer driver") Signed-off-by: Samuel Holland <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 41929c9 commit 232ccac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clocksource/timer-riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static int riscv_clock_next_event(unsigned long delta,
3434
static unsigned int riscv_clock_event_irq;
3535
static DEFINE_PER_CPU(struct clock_event_device, riscv_clock_event) = {
3636
.name = "riscv_timer_clockevent",
37-
.features = CLOCK_EVT_FEAT_ONESHOT,
37+
.features = CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP,
3838
.rating = 100,
3939
.set_next_event = riscv_clock_next_event,
4040
};

0 commit comments

Comments
 (0)