From 0ea7bf19e48c726863432bb335ebaf10236cb5fa Mon Sep 17 00:00:00 2001 From: Marcin Szymczyk Date: Tue, 16 Apr 2024 18:31:48 +0200 Subject: [PATCH] arch: riscv: irq_manage: support ISR_OFFSET in dynamic IRQs `CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET` shoud be taken into account in `arch_irq_connect_dynamic`, same as it is done in `ARCH_IRQ_CONNECT` macro. Signed-off-by: Marcin Szymczyk --- arch/riscv/core/irq_manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/core/irq_manage.c b/arch/riscv/core/irq_manage.c index bf0b6684a5..b60deceefa 100644 --- a/arch/riscv/core/irq_manage.c +++ b/arch/riscv/core/irq_manage.c @@ -43,7 +43,7 @@ int arch_irq_connect_dynamic(unsigned int irq, unsigned int priority, void (*routine)(const void *parameter), const void *parameter, uint32_t flags) { - z_isr_install(irq, routine, parameter); + z_isr_install(irq + CONFIG_RISCV_RESERVED_IRQ_ISR_TABLES_OFFSET, routine, parameter); #if defined(CONFIG_RISCV_HAS_PLIC) || defined(CONFIG_RISCV_HAS_CLIC) z_riscv_irq_priority_set(irq, priority, flags);