]> git.ipfire.org Git - thirdparty/linux.git/commit
irqchip/riscv-intc: Allow large non-standard interrupt number
authorYu Chien Peter Lin <peterlin@andestech.com>
Thu, 22 Feb 2024 08:39:38 +0000 (16:39 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 Feb 2024 08:57:42 +0000 (09:57 +0100)
commit96303bcb401c21dc1426d8d9bb1fc74aae5c02a9
tree612e1ece0c6ba8f0017cefc563069689fd7d7fbd
parent6613476e225e090cc9aad49be7fa504e290dd33d
irqchip/riscv-intc: Allow large non-standard interrupt number

Currently, the implementation of the RISC-V INTC driver uses the
interrupt cause as the hardware interrupt number, with a maximum of
64 interrupts. However, the platform can expand the interrupt number
further for custom local interrupts.

To fully utilize the available local interrupt sources, switch
to using irq_domain_create_tree() that creates the radix tree
map, add global variables (riscv_intc_nr_irqs, riscv_intc_custom_base
and riscv_intc_custom_nr_irqs) to determine the valid range of local
interrupt number (hwirq).

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Randolph <randolph@andestech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Link: https://lore.kernel.org/r/20240222083946.3977135-3-peterlin@andestech.com
drivers/irqchip/irq-riscv-intc.c