All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Timer events for OpenSBI
@ 2026-04-25 10:40 Anup Patel
  2026-04-25 10:40 ` [PATCH v2 1/4] include: sbi: Add sbi_scratch_hartindex() macro Anup Patel
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Anup Patel @ 2026-04-25 10:40 UTC (permalink / raw)
  To: Atish Patra; +Cc: Andrew Jones, Samuel Holland, Anup Patel, opensbi, Anup Patel

This series extends the sbi_timer framework to support
timer events usable from any part of OpenSBI. The platform
drivers in OpenSBI can use timer events for timeouts or
periodic checks.

These patches can also be found in sbi_timer_imp_v2 branch
at: https://github.com/avpatel/opensbi.git

Changes since v1:
- New PATCH4 adding sbi_timer_compute_delta() and friends
- Fix typo on cleanup() comments of struct sbi_timer_event
- Remove the spin_unlock()/lock() dance from sbi_timer_event_start()
  and sbi_timer_exit()
- Update timer device in sbi_timer_event_stop() only when
  required (i.e. ev->hart_index != current_hartindex())
- Break the loop in sbi_timer_process() when
  ev->time_stamp > sbi_timer_value())
- Allow callback() function in struct sbi_timer_event to
  optionally provide event re-start details

Anup Patel (4):
  include: sbi: Add sbi_scratch_hartindex() macro
  lib: sbi_timer: Introduce per-HART timer state
  lib: sbi_timer: Add support for timer events
  lib: sbi_timer: Introduce sbi_timer_compute_delta() and friends

 include/sbi/sbi_scratch.h  |   6 +-
 include/sbi/sbi_timer.h    |  92 ++++++++++++-
 lib/sbi/sbi_ecall_legacy.c |   4 +-
 lib/sbi/sbi_ecall_time.c   |   4 +-
 lib/sbi/sbi_timer.c        | 256 +++++++++++++++++++++++++++++++------
 5 files changed, 314 insertions(+), 48 deletions(-)

-- 
2.43.0


-- 
opensbi mailing list
opensbi@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/opensbi

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

end of thread, other threads:[~2026-05-09  7:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-25 10:40 [PATCH v2 0/4] Timer events for OpenSBI Anup Patel
2026-04-25 10:40 ` [PATCH v2 1/4] include: sbi: Add sbi_scratch_hartindex() macro Anup Patel
2026-04-25 10:40 ` [PATCH v2 2/4] lib: sbi_timer: Introduce per-HART timer state Anup Patel
2026-04-25 10:40 ` [PATCH v2 3/4] lib: sbi_timer: Add support for timer events Anup Patel
2026-04-29  8:18   ` Nicholas Piggin
2026-04-25 10:40 ` [PATCH v2 4/4] lib: sbi_timer: Introduce sbi_timer_compute_delta() and friends Anup Patel
2026-04-29  8:20   ` Nicholas Piggin
2026-05-09  7:46 ` [PATCH v2 0/4] Timer events for OpenSBI Anup Patel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.