]> git.baikalelectronics.ru Git - kernel.git/commit
metag: SMP: Fix 4KiB stack setup on secondary CPUs
authorJames Hogan <james.hogan@imgtec.com>
Tue, 15 Sep 2015 21:19:04 +0000 (22:19 +0100)
committerJames Hogan <james.hogan@imgtec.com>
Tue, 15 Sep 2015 21:52:47 +0000 (22:52 +0100)
commitee7cf38cf78ee7f7577f2b6c61b9fbe6b71ed064
tree7a5bcb900b44470941c6bad741522d5b606a3069
parent48fdd7874f07dfb3a661edca7ea1d4807bb4ccb0
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
arch/metag/kernel/smp.c