aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorMarc Zyngier <Marc.Zyngier@arm.com>2013-11-04 11:55:22 -0500
committerCatalin Marinas <catalin.marinas@arm.com>2013-11-04 13:18:05 -0500
commit7ade67b5984d0a0434462fda733ab5138c63aae1 (patch)
tree4de2d88d8d633bdc0806c9929e6e5cce5e5a6374 /arch/arm64
parent3c620626c0cd4cfca856d70a846398275b48a768 (diff)
arm64: move enabling of GIC before CPUs are set online
Commit 53ae3acd (arm64: Only enable local interrupts after the CPU is marked online) moved the enabling of the GIC after the CPUs are marked online. This has some interesting effect: [...] [<ffffffc0002eefd8>] gic_raise_softirq+0xf8/0x160 [<ffffffc000088f58>] smp_send_reschedule+0x38/0x40 [<ffffffc0000c8728>] resched_task+0x84/0xc0 [<ffffffc0000c8cdc>] check_preempt_curr+0x58/0x98 [<ffffffc0000c8d38>] ttwu_do_wakeup+0x1c/0xf4 [<ffffffc0000c8f90>] ttwu_do_activate.constprop.84+0x64/0x70 [<ffffffc0000cad30>] try_to_wake_up+0x1d4/0x2b4 [<ffffffc0000cae6c>] default_wake_function+0x10/0x18 [<ffffffc0000c5ca4>] __wake_up_common+0x60/0xa0 [<ffffffc0000c7784>] complete+0x48/0x64 [<ffffffc000088bec>] secondary_start_kernel+0xe8/0x110 [...] Here, we end-up calling gic_raise_softirq without having initialized the interrupt controller for this CPU. While this goes unnoticed with GICv2 (the distributor is always accessible), it explodes with GICv3. The fix is to move the call to notify_cpu_starting before we set the secondary CPU online. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/kernel/smp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 5b4ddbd653c3..3abb9e797dd4 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -146,6 +146,11 @@ asmlinkage void secondary_start_kernel(void)
146 cpu_ops[cpu]->cpu_postboot(); 146 cpu_ops[cpu]->cpu_postboot();
147 147
148 /* 148 /*
149 * Enable GIC and timers.
150 */
151 notify_cpu_starting(cpu);
152
153 /*
149 * OK, now it's safe to let the boot CPU continue. Wait for 154 * OK, now it's safe to let the boot CPU continue. Wait for
150 * the CPU migration code to notice that the CPU is online 155 * the CPU migration code to notice that the CPU is online
151 * before we continue. 156 * before we continue.
@@ -153,11 +158,6 @@ asmlinkage void secondary_start_kernel(void)
153 set_cpu_online(cpu, true); 158 set_cpu_online(cpu, true);
154 complete(&cpu_running); 159 complete(&cpu_running);
155 160
156 /*
157 * Enable GIC and timers.
158 */
159 notify_cpu_starting(cpu);
160
161 local_irq_enable(); 161 local_irq_enable();
162 local_fiq_enable(); 162 local_fiq_enable();
163 163