lib: sbi: Add sbi_trap_set_external_irqfn() API

This patch adds sbi_trap_set_external_irqfn() API which can be used by
OpenSBI platform code to set a callback function for external interrupts.
The RISC-V AIA IMSIC driver will use this API to implement inter-processor
interrupts on-top-of MSIs.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
Anup Patel authored and Anup Patel committed 2022-02-15 20:33:55 +05:30
1 parent 65b4c7c01e
commit 222132f48c
2 files changed
+31

No files matched your search

+2
View File
@@ -205,6 +205,8 @@ struct sbi_trap_info {
int sbi_trap_redirect(struct sbi_trap_regs *regs,
struct sbi_trap_info *trap);
void sbi_trap_set_external_irqfn(int (*fn)(struct sbi_trap_regs *regs));
struct sbi_trap_regs *sbi_trap_handler(struct sbi_trap_regs *regs);
void __noreturn sbi_trap_exit(const struct sbi_trap_regs *regs);