summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_32.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>2010-08-18 06:44:25 +0000
committerJosh Boyer <jwboyer@linux.vnet.ibm.com>2010-08-23 07:37:53 -0400
commit3e7f45ad521ac3e38889d255ec7676037fa84ae2 (patch)
tree4f7f0461d2486bf2e48b633ea060be6660fb11b2 /arch/powerpc/kernel/setup_32.c
parent66477466b8b79c98af17f1c2267596c8b6b4b561 (diff)
downloadop-kernel-dev-3e7f45ad521ac3e38889d255ec7676037fa84ae2.zip
op-kernel-dev-3e7f45ad521ac3e38889d255ec7676037fa84ae2.tar.gz
powerpc/4xx: Index interrupt stacks by physical cpu
The interrupt stacks need to be indexed by the physical cpu since the critical, debug and machine check handlers use the contents of SPRN_PIR to index the critirq_ctx, dbgirq_ctx, and mcheckirq_ctx arrays. Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com> Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Diffstat (limited to 'arch/powerpc/kernel/setup_32.c')
-rw-r--r--arch/powerpc/kernel/setup_32.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index a10ffc8..93666f9 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -258,17 +258,18 @@ static void __init irqstack_early_init(void)
#if defined(CONFIG_BOOKE) || defined(CONFIG_40x)
static void __init exc_lvl_early_init(void)
{
- unsigned int i;
+ unsigned int i, hw_cpu;
/* interrupt stacks must be in lowmem, we get that for free on ppc32
* as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */
for_each_possible_cpu(i) {
- critirq_ctx[i] = (struct thread_info *)
+ hw_cpu = get_hard_smp_processor_id(i);
+ critirq_ctx[hw_cpu] = (struct thread_info *)
__va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
#ifdef CONFIG_BOOKE
- dbgirq_ctx[i] = (struct thread_info *)
+ dbgirq_ctx[hw_cpu] = (struct thread_info *)
__va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
- mcheckirq_ctx[i] = (struct thread_info *)
+ mcheckirq_ctx[hw_cpu] = (struct thread_info *)
__va(memblock_alloc(THREAD_SIZE, THREAD_SIZE));
#endif
}
OpenPOWER on IntegriCloud