irqchip: armada-370-xp: Fix chained per-cpu interrupts
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 3 Mar 2015 10:27:23 +0000 (11:27 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 28 Mar 2015 14:03:20 +0000 (10:03 -0400)
commit016958bf0577daa731bf0fc84aaa8a47d2dd705d
tree1e711872805d660cf257745f734bbc2e282e87bb
parenta10f28903b99b7a5fbc08dccaf2578e43a9706d5
irqchip: armada-370-xp: Fix chained per-cpu interrupts

[ Upstream commit 5724be8464dceac047c1eaddaa3651cea0ec16ca ]

On the Cortex-A9-based Armada SoCs, the MPIC is not the primary interrupt
controller. Yet, it still has to handle some per-cpu interrupt.

To do so, it is chained with the GIC using a per-cpu interrupt. However, the
current code only call irq_set_chained_handler, which is called and enable that
interrupt only on the boot CPU, which means that the parent per-CPU interrupt
is never unmasked on the secondary CPUs, preventing the per-CPU interrupt to
actually work as expected.

This was not seen until now since the only MPIC PPI users were the Marvell
timers that were not working, but not used either since the system use the ARM
TWD by default, and the ethernet controllers, that are faking there interrupts
as SPI, and don't really expect to have interrupts on the secondary cores
anyway.

Add a CPU notifier that will enable the PPI on the secondary cores when they
are brought up.

Cc: <stable@vger.kernel.org> # 3.15+
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Link: https://lkml.kernel.org/r/1425378443-28822-1-git-send-email-maxime.ripard@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/irqchip/irq-armada-370-xp.c