[PATCH] [ppc64] Fix POWER5/JS20 SMP init

From: Anton Blanchard
Date: Mon Sep 06 2004 - 23:17:37 EST



Hi,

My recent change to dynamically allocate emergency stacks broke JS20
blades and POWER5. Since we use the emergency stacks in real mode during
secondary CPU bringup they must be below the RMO.

Signed-off-by: Anton Blanchard <anton@xxxxxxxxx>

Anton

--

diff -puN arch/ppc64/kernel/setup.c~debug_js20_smp arch/ppc64/kernel/setup.c
--- foobar2/arch/ppc64/kernel/setup.c~debug_js20_smp 2004-09-06 22:05:07.170412339 +1000
+++ foobar2-anton/arch/ppc64/kernel/setup.c 2004-09-07 13:48:49.364245252 +1000
@@ -695,16 +695,23 @@ static void __init irqstack_early_init(v
*/
static void __init emergency_stack_init(void)
{
+ unsigned long limit;
unsigned int i;

/*
* Emergency stacks must be under 256MB, we cannot afford to take
* SLB misses on them. The ABI also requires them to be 128-byte
* aligned.
+ *
+ * Since we use these as temporary stacks during secondary CPU
+ * bringup, we need to get at them in real mode. This means they
+ * must also be within the RMO region.
*/
+ limit = min(0x10000000UL, lmb.rmo_size);
+
for_each_cpu(i)
paca[i].emergency_sp = __va(lmb_alloc_base(PAGE_SIZE, 128,
- 0x10000000)) + PAGE_SIZE;
+ limit)) + PAGE_SIZE;
}

/*
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/