diff options
author | Marek BehĂșn <kabel@kernel.org> | 2024-08-07 18:41:02 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-08-08 17:15:01 +0200 |
commit | 4042a965a5e62c8d298d642cbf72b14f41687319 (patch) | |
tree | acaa6d24b25b3b0af13316dd0f6bf923762a37cc /drivers/irqchip | |
parent | irqchip/armada-370-xp: Fix reenabling last per-CPU interrupt (diff) | |
download | linux-4042a965a5e62c8d298d642cbf72b14f41687319.tar.xz linux-4042a965a5e62c8d298d642cbf72b14f41687319.zip |
irqchip/armada-370-xp: Iterate only valid bits of the per-CPU interrupt cause register
Use MPIC_PER_CPU_IRQS_NR (29) bound instead of BITS_PER_LONG (32) when
iterating the bits of the per-CPU interrupt cause register, since there
are only 29 per-CPU interrupts. The top 3 bits are always zero anyway.
Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r-- | drivers/irqchip/irq-armada-370-xp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c index 83afc3a27812..36d1bac8a99f 100644 --- a/drivers/irqchip/irq-armada-370-xp.c +++ b/drivers/irqchip/irq-armada-370-xp.c @@ -678,7 +678,7 @@ static void mpic_handle_cascade_irq(struct irq_desc *desc) cause = readl_relaxed(mpic->per_cpu + MPIC_PPI_CAUSE); cpuid = cpu_logical_map(smp_processor_id()); - for_each_set_bit(i, &cause, BITS_PER_LONG) { + for_each_set_bit(i, &cause, MPIC_PER_CPU_IRQS_NR) { irqsrc = readl_relaxed(mpic->base + MPIC_INT_SOURCE_CTL(i)); /* Check if the interrupt is not masked on current CPU. |