Re: [PATCH v2 0/4] Timer events for OpenSBI

Anup Patel <[email protected]>
Newsgroups org.infradead.lists.opensbi
Message-ID <CAAhSdy2700-Oi0xo2QriURe8d165RayreQuJtYB=kaRJHAKJGg@mail.gmail.com>
On Sat, Apr 25, 2026 at 4:10 PM Anup Patel <[email protected]> wrote:
>
> 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
>

Applied this series to the riscv/opensbi repo.

Thanks,
Anup

-- 
opensbi mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/opensbi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.