diff options
author | James Hogan <james.hogan@imgtec.com> | 2015-09-15 17:19:04 -0400 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2015-09-15 17:52:47 -0400 |
commit | 928df02bd46e2fe02cfd3127ba1814796d6d80b0 (patch) | |
tree | 7a5bcb900b44470941c6bad741522d5b606a3069 | |
parent | 6ff33f3902c3b1c5d0db6b1e2c70b6d76fba357f (diff) |
metag: SMP: Fix 4KiB stack setup on secondary CPUs
Back in early 2008, 4KiB stack support was added to reduce memory
consumption on workloads with lots of threads, using a separate IRQ
stack per CPU to alleviate stack pressure. However the SMP code added a
year and a half later didn't set up the IRQ stack when bringing up
secondary CPUs, resulting in a crash when SMP is configured with 4KiB
stacks, as soon as the first interrupt arrived on a secondary CPU.
Fix with calls to irq_ctx_exit()/irq_ctx_exit() when bringing up/down a
CPU.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-metag@vger.kernel.org
-rw-r--r-- | arch/metag/kernel/smp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/metag/kernel/smp.c b/arch/metag/kernel/smp.c index ac3a199e33e7..c3c6f0864881 100644 --- a/arch/metag/kernel/smp.c +++ b/arch/metag/kernel/smp.c | |||
@@ -312,6 +312,7 @@ void cpu_die(void) | |||
312 | { | 312 | { |
313 | local_irq_disable(); | 313 | local_irq_disable(); |
314 | idle_task_exit(); | 314 | idle_task_exit(); |
315 | irq_ctx_exit(smp_processor_id()); | ||
315 | 316 | ||
316 | (void)cpu_report_death(); | 317 | (void)cpu_report_death(); |
317 | 318 | ||
@@ -366,6 +367,7 @@ asmlinkage void secondary_start_kernel(void) | |||
366 | panic("No TBI found!"); | 367 | panic("No TBI found!"); |
367 | 368 | ||
368 | per_cpu_trap_init(cpu); | 369 | per_cpu_trap_init(cpu); |
370 | irq_ctx_init(cpu); | ||
369 | 371 | ||
370 | preempt_disable(); | 372 | preempt_disable(); |
371 | 373 | ||