mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
lib: sbi: Add a simple external interrupt handling framework
Currently, the external interrupt handling is scattered between sbi_init and sbi_trap. This patch moves all external interrupt handling into a simple framework called sbi_irqchip. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
#include <sbi/sbi_domain.h>
|
||||
#include <sbi/sbi_hartmask.h>
|
||||
#include <sbi/sbi_ipi.h>
|
||||
#include <sbi/sbi_irqchip.h>
|
||||
#include <sbi/sbi_error.h>
|
||||
#include <sbi/sbi_trap.h>
|
||||
#include <sbi_utils/irqchip/imsic.h>
|
||||
|
||||
#define IMSIC_MMIO_PAGE_LE 0x00
|
||||
@@ -268,7 +268,7 @@ int imsic_cold_irqchip_init(struct imsic_data *imsic)
|
||||
return SBI_EINVAL;
|
||||
|
||||
/* Setup external interrupt function for IMSIC */
|
||||
sbi_trap_set_external_irqfn(imsic_external_irqfn);
|
||||
sbi_irqchip_set_irqfn(imsic_external_irqfn);
|
||||
|
||||
/* Add IMSIC regions to the root domain */
|
||||
for (i = 0; i < IMSIC_MAX_REGS && imsic->regs[i].size; i++) {
|
||||
|
Reference in New Issue
Block a user