public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] clocksouce/timer-clint|riscv: some improvements
@ 2024-04-06 11:17 Jisheng Zhang
  2024-04-06 11:17 ` [PATCH v2 1/3] clocksource/drivers/timer-riscv: Add set_state_oneshot_stopped Jisheng Zhang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jisheng Zhang @ 2024-04-06 11:17 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Paul Walmsley, Palmer Dabbelt,
	Albert Ou, Samuel Holland
  Cc: linux-kernel, linux-riscv

This series is a simple improvement for timer-clint and timer-riscv:

Add set_state_shutdown for timer-clint, this hook is used when
switching clockevent from timer-clint to another timer.

Add set_state_oneshot_stopped for both timer-clint and timer-riscv,
this hook is to avoid spurious timer interrupts when KTIME_MAX is
usd. Check commit 8fff52fd5093 ("clockevents: Introduce
CLOCK_EVT_STATE_ONESHOT_STOPPED state") for more information.

Since v1:
  - use U64_MAX instead of ULONG_MAX in clint_clock_shutdown, this is
    to  "produce a 64-bit value on riscv32" as pointed out by Samuel

Jisheng Zhang (3):
  clocksource/drivers/timer-riscv: Add set_state_oneshot_stopped
  clocksource/drivers/timer-clint: Add set_state_shutdown
  clocksource/drivers/timer-clint: Add set_state_oneshot_stopped

 drivers/clocksource/timer-clint.c | 19 +++++++++++++++----
 drivers/clocksource/timer-riscv.c | 11 ++++++-----
 2 files changed, 21 insertions(+), 9 deletions(-)

-- 
2.43.0


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

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

end of thread, other threads:[~2024-04-06 11:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 11:17 [PATCH v2 0/3] clocksouce/timer-clint|riscv: some improvements Jisheng Zhang
2024-04-06 11:17 ` [PATCH v2 1/3] clocksource/drivers/timer-riscv: Add set_state_oneshot_stopped Jisheng Zhang
2024-04-06 11:17 ` [PATCH v2 2/3] clocksource/drivers/timer-clint: Add set_state_shutdown Jisheng Zhang
2024-04-06 11:17 ` [PATCH v2 3/3] clocksource/drivers/timer-clint: Add set_state_oneshot_stopped Jisheng Zhang

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