diff options
author | Clément Léger <cleger@rivosinc.com> | 2025-01-10 14:15:54 +0100 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2025-01-30 10:40:49 +0530 |
commit | 93f7d819fdeb3c5e82d5d761968c325f1407d517 (patch) | |
tree | f883dd87676fb643a466cabe8e86b05bccf65faf /lib/utils/cppc/fdt_cppc_rpmi.c | |
parent | 147978f3124418609c88e25ba30bef7205250a4d (diff) | |
download | opensbi-93f7d819fdeb3c5e82d5d761968c325f1407d517.zip opensbi-93f7d819fdeb3c5e82d5d761968c325f1407d517.tar.gz opensbi-93f7d819fdeb3c5e82d5d761968c325f1407d517.tar.bz2 |
lib: sbi: sse: allow adding new events
In order to allow events to be dynamically added, remove the existing
static array of events and use a simply linked list of supported events.
This allows us to move the cb_ops into this list and associated it with
an event_id. Drivers can now register cb_ops before bringing up the sse
core to handle additional events (platform ones for instance).
sbi_sse_init() now allocates as many events as present in the linked
list. Events can now be added with sbi_sse_add_event() which allows to
add new supported events with some callback operations if any. If an
event is not to be supported, then sbi_sse_add_event() should not be
called. This approach currently consider that local events are to be
supported on all harts (ie, they all support the same ISA or
dependencies). If per-hart event availability needs to be supported,
then, an is_supported() callback could be added later and called for
each hart.
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Diffstat (limited to 'lib/utils/cppc/fdt_cppc_rpmi.c')
0 files changed, 0 insertions, 0 deletions