aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2013-11-28 09:21:40 -0500
committerThomas Gleixner <tglx@linutronix.de>2013-11-28 09:41:53 -0500
commit08332dff8adebb74171e98e008d6c20de6658c42 (patch)
tree63e596dbab1e219c7d451766ffaaea721f30eee0 /drivers/irqchip
parentac01810c9d2814238f08a227062e66a35a0e1ea2 (diff)
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>
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-gic.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index d0e948084eaf..e219a5bf0cac 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -814,12 +814,13 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
814 if (WARN_ON(!gic->domain)) 814 if (WARN_ON(!gic->domain))
815 return; 815 return;
816 816
817 if (gic_nr == 0) {
817#ifdef CONFIG_SMP 818#ifdef CONFIG_SMP
818 set_smp_cross_call(gic_raise_softirq); 819 set_smp_cross_call(gic_raise_softirq);
819 register_cpu_notifier(&gic_cpu_notifier); 820 register_cpu_notifier(&gic_cpu_notifier);
820#endif 821#endif
821 822 set_handle_irq(gic_handle_irq);
822 set_handle_irq(gic_handle_irq); 823 }
823 824
824 gic_chip.flags |= gic_arch_extn.flags; 825 gic_chip.flags |= gic_arch_extn.flags;
825 gic_dist_init(gic); 826 gic_dist_init(gic);