irqchip: Gic: fix boot for chained gics
authorMark Rutland <mark.rutland@arm.com>
Thu, 28 Nov 2013 14:21:40 +0000 (14:21 +0000)
committerChristoffer Dall <christoffer.dall@linaro.org>
Thu, 2 Oct 2014 07:30:41 +0000 (09:30 +0200)
commit893fe6dda7e382a2ee069c43417dd292ce422a63
tree0d95b4196e166c32fb31f967c3d62128774f724b
parent43eafb4c0fff64f9ec85fa98f2300c52b2c27aff
irqchip: Gic: fix boot for chained gics

As of c0114709ed: "irqchip: gic: Perform the gic_secondary_init() call
via CPU notifier", booting on a platform with chained gics (e.g.
Realview EB ARM11MPCore) will result in the gic_cpu_notifier being
registered twice, corrupting the cpu notifier list and rendering the
platform unbootable.

This patch ensures that we only register the notifier for the first
gic, allowing platforms with chained gics to boot. At the same time we
limit the pointlessly duplicated calls to set_smp_cross_call and
set_handle_irq to the first gic registered.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: marc.zyngier@arm.com
Cc: rob.herring@calxeda.com
Cc: olof@lixom.net
Link: http://lkml.kernel.org/r/1385648500-29048-1-git-send-email-mark.rutland@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit 08332dff8adebb74171e98e008d6c20de6658c42)
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
drivers/irqchip/irq-gic.c