Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/riscv: Events are stopped during CPU suspend
@ 2022-05-09  1:21 Samuel Holland
  2022-05-09  2:56 ` Jessica Clarke
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Samuel Holland @ 2022-05-09  1:21 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: Samuel Holland, Albert Ou, Atish Patra, Dmitriy Cherkasov,
	Palmer Dabbelt, Paul Walmsley, linux-kernel, linux-riscv

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: 62b019436814 ("clocksource: new RISC-V SBI timer driver")
Signed-off-by: Samuel Holland <samuel@sholland.org>
---

 drivers/clocksource/timer-riscv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
index 1767f8bf2013..593d5a957b69 100644
--- a/drivers/clocksource/timer-riscv.c
+++ b/drivers/clocksource/timer-riscv.c
@@ -34,7 +34,7 @@ static int riscv_clock_next_event(unsigned long delta,
 static unsigned int riscv_clock_event_irq;
 static DEFINE_PER_CPU(struct clock_event_device, riscv_clock_event) = {
 	.name			= "riscv_timer_clockevent",
-	.features		= CLOCK_EVT_FEAT_ONESHOT,
+	.features		= CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP,
 	.rating			= 100,
 	.set_next_event		= riscv_clock_next_event,
 };
-- 
2.35.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2022-10-28  0:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-09  1:21 [PATCH] clocksource/drivers/riscv: Events are stopped during CPU suspend Samuel Holland
2022-05-09  2:56 ` Jessica Clarke
2022-05-09  3:51 ` Anup Patel
2022-05-09 11:44 ` Daniel Lezcano
2022-09-29 21:50 ` Conor Dooley
2022-10-09 23:45   ` Palmer Dabbelt
2022-10-24  5:01     ` Samuel Holland
2022-10-24  7:04       ` Conor Dooley
2022-10-24  8:04       ` Anup Patel
2022-10-27 23:07         ` Palmer Dabbelt
2022-10-27 23:41           ` Samuel Holland
2022-10-28  0:30             ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox