Commit 080481f9 authored by Maxime Ripard's avatar Maxime Ripard Committed by David S. Miller

irqchip: armada-370-xp: Rework per-cpu interrupts handling

The MPIC driver currently has a list of interrupts to handle as per-cpu.

Since the timer, fabric and neta interrupts were the only per-cpu
interrupts in the system, we can now remove the switch and just check for
the hardware irq number to determine whether a given interrupt is per-cpu
or not.
Signed-off-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: default avatarGregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aec2e2ad
...@@ -56,9 +56,6 @@ ...@@ -56,9 +56,6 @@
#define ARMADA_370_XP_MAX_PER_CPU_IRQS (28) #define ARMADA_370_XP_MAX_PER_CPU_IRQS (28)
#define ARMADA_370_XP_TIMER0_PER_CPU_IRQ (5)
#define ARMADA_370_XP_FABRIC_IRQ (3)
#define IPI_DOORBELL_START (0) #define IPI_DOORBELL_START (0)
#define IPI_DOORBELL_END (8) #define IPI_DOORBELL_END (8)
#define IPI_DOORBELL_MASK 0xFF #define IPI_DOORBELL_MASK 0xFF
...@@ -81,13 +78,10 @@ static phys_addr_t msi_doorbell_addr; ...@@ -81,13 +78,10 @@ static phys_addr_t msi_doorbell_addr;
static inline bool is_percpu_irq(irq_hw_number_t irq) static inline bool is_percpu_irq(irq_hw_number_t irq)
{ {
switch (irq) { if (irq <= ARMADA_370_XP_MAX_PER_CPU_IRQS)
case ARMADA_370_XP_TIMER0_PER_CPU_IRQ:
case ARMADA_370_XP_FABRIC_IRQ:
return true; return true;
default:
return false; return false;
}
} }
/* /*
...@@ -549,7 +543,7 @@ static void armada_370_xp_mpic_resume(void) ...@@ -549,7 +543,7 @@ static void armada_370_xp_mpic_resume(void)
if (virq == 0) if (virq == 0)
continue; continue;
if (irq != ARMADA_370_XP_TIMER0_PER_CPU_IRQ) if (!is_percpu_irq(irq))
writel(irq, per_cpu_int_base + writel(irq, per_cpu_int_base +
ARMADA_370_XP_INT_CLEAR_MASK_OFFS); ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment