diff options
author | Anup Patel <apatel@ventanamicro.com> | 2021-04-06 14:37:42 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-02-15 18:03:55 +0300 |
commit | 222132f48c8efd3b2c84b0883df18216b170bf3d (patch) | |
tree | 8e034d195e217a8a11cc95bcd8de9a0ae701bc49 /include/sbi | |
parent | 65b4c7c01e7447c4d762af905a5051e13361b31e (diff) | |
download | opensbi-222132f48c8efd3b2c84b0883df18216b170bf3d.tar.xz |
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>
Diffstat (limited to 'include/sbi')
-rw-r--r-- | include/sbi/sbi_trap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sbi/sbi_trap.h b/include/sbi/sbi_trap.h index d205056..4f611fa 100644 --- a/include/sbi/sbi_trap.h +++ b/include/sbi/sbi_trap.h @@ -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); |