[PATCH] irqchip/riscv-intc: Fix missing .free callback for freeing local IRQs
Nick Hu
nick.hu at sifive.com
Thu Nov 13 23:28:44 PST 2025
The irq_domain_free_irqs() helper requires that the irq_domain_ops->free
callback be implemented. Otherwise, the kernel reports the warning
message "NULL pointer, cannot free irq" when the user calls
irq_dispose_mapping() to release the per-HART local IRQs.
Set the irq_domain_ops->free to irq_domain_free_irqs_top() to free the
IRQs.
Signed-off-by: Nick Hu <nick.hu at sifive.com>
---
drivers/irqchip/irq-riscv-intc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
index e5805885394ee3892a9a9784a937e234490ba0ea..70290b35b3173eb1fd5eb448f5432735210b5444 100644
--- a/drivers/irqchip/irq-riscv-intc.c
+++ b/drivers/irqchip/irq-riscv-intc.c
@@ -166,7 +166,8 @@ static int riscv_intc_domain_alloc(struct irq_domain *domain,
static const struct irq_domain_ops riscv_intc_domain_ops = {
.map = riscv_intc_domain_map,
.xlate = irq_domain_xlate_onecell,
- .alloc = riscv_intc_domain_alloc
+ .alloc = riscv_intc_domain_alloc,
+ .free = irq_domain_free_irqs_top,
};
static struct fwnode_handle *riscv_intc_hwnode(void)
---
base-commit: 6da43bbeb6918164f7287269881a5f861ae09d7e
change-id: 20251114-rv-intc-fix-87f4a81a8133
Best regards,
--
Nick Hu <nick.hu at sifive.com>
More information about the linux-riscv
mailing list