irqchip: Gic: fix boot for chained gics
authorMark Rutland <mark.rutland@arm.com>
Thu, 28 Nov 2013 14:21:40 +0000 (14:21 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 28 Nov 2013 14:41:53 +0000 (15:41 +0100)
commit08332dff8adebb74171e98e008d6c20de6658c42
tree63e596dbab1e219c7d451766ffaaea721f30eee0
parentac01810c9d2814238f08a227062e66a35a0e1ea2
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>
drivers/irqchip/irq-gic.c