2024-03-18 09:41:02

by Ingo Molnar

[permalink] [raw]
Subject: [GIT PULL] IRQ fix


Linus,

Please pull the latest irq/urgent git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2024-03-17

# HEAD: ca5b0b717b75d0f86f7f5dfe18369781bec742ad irqchip/riscv-intc: Fix use of AIA interrupts 32-63 on riscv32

A RISC-V irqchip driver fix.

Thanks,

Ingo

------------------>
Samuel Holland (1):
irqchip/riscv-intc: Fix use of AIA interrupts 32-63 on riscv32


drivers/irqchip/irq-riscv-intc.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/irqchip/irq-riscv-intc.c b/drivers/irqchip/irq-riscv-intc.c
index f87aeab460eb..9e71c4428814 100644
--- a/drivers/irqchip/irq-riscv-intc.c
+++ b/drivers/irqchip/irq-riscv-intc.c
@@ -149,8 +149,9 @@ static int riscv_intc_domain_alloc(struct irq_domain *domain,
* Only allow hwirq for which we have corresponding standard or
* custom interrupt enable register.
*/
- if ((hwirq >= riscv_intc_nr_irqs && hwirq < riscv_intc_custom_base) ||
- (hwirq >= riscv_intc_custom_base + riscv_intc_custom_nr_irqs))
+ if (hwirq >= riscv_intc_nr_irqs &&
+ (hwirq < riscv_intc_custom_base ||
+ hwirq >= riscv_intc_custom_base + riscv_intc_custom_nr_irqs))
return -EINVAL;

for (i = 0; i < nr_irqs; i++) {
@@ -183,10 +184,12 @@ static int __init riscv_intc_init_common(struct fwnode_handle *fn, struct irq_ch
return -ENXIO;
}

- if (riscv_isa_extension_available(NULL, SxAIA))
+ if (riscv_isa_extension_available(NULL, SxAIA)) {
+ riscv_intc_nr_irqs = 64;
rc = set_handle_irq(&riscv_intc_aia_irq);
- else
+ } else {
rc = set_handle_irq(&riscv_intc_irq);
+ }
if (rc) {
pr_err("failed to set irq handler\n");
return rc;
@@ -195,7 +198,7 @@ static int __init riscv_intc_init_common(struct fwnode_handle *fn, struct irq_ch
riscv_set_intc_hwnode_fn(riscv_intc_hwnode);

pr_info("%d local interrupts mapped%s\n",
- riscv_isa_extension_available(NULL, SxAIA) ? 64 : riscv_intc_nr_irqs,
+ riscv_intc_nr_irqs,
riscv_isa_extension_available(NULL, SxAIA) ? " using AIA" : "");
if (riscv_intc_custom_nr_irqs)
pr_info("%d custom local interrupts mapped\n", riscv_intc_custom_nr_irqs);


2024-03-18 16:49:46

by pr-tracker-bot

[permalink] [raw]
Subject: Re: [GIT PULL] IRQ fix

The pull request you sent on Mon, 18 Mar 2024 10:40:29 +0100:

> git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2024-03-17

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/4ae3dc83b047d51485cce1a72be277a110d77c91

Thank you!

--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html