irqchip/irq-bcm7038-l1: Restrict affinity setting to MIPS
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 20 Oct 2021 18:48:51 +0000 (11:48 -0700)
committerMarc Zyngier <maz@kernel.org>
Wed, 20 Oct 2021 19:06:33 +0000 (20:06 +0100)
commit3578fd47137c405b6fb9f90e2e6d1654c71f5e1e
treeb73c1158e02dc806b1a4aba21ebe890490f731e2
parent35eb2ef5df42d3c3d2186ae6dab5622a31e6ceee
irqchip/irq-bcm7038-l1: Restrict affinity setting to MIPS

Only MIPS based platforms using this interrupt controller as first level
interrupt controller can actually change the affinity of interrupts by
re-programming the affinity mask of the interrupt controller and use
another word group to have another CPU process the interrupt.

When this interrupt is used as a second level interrupt controller on
ARM/ARM64 there is no way to change the interrupt affinity. This fixes a
NULL pointer de-reference while trying to change the affinity since
there is only a single word group in that case, and we would have been
overruning the intc->cpus[] array.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211020184859.2705451-6-f.fainelli@gmail.com
drivers/irqchip/irq-bcm7038-l1.c