Skip to contentSkip to conversation

Fix POWER5/JS20 SMP init

PATCH New Anton Blanchard 1 participant 1 message Sep 7, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix POWER5/JS20 SMP init

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.

Anton

--

arch/ppc64/kernel/setup.c renamed from arch/ppc64/kernel/setup.c~debug_js20_smp +8 -1
diff -puN arch/ppc64/kernel/setup.c~debug_js20_smp arch/ppc64/kernel/setup.c
@@ -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;
 }
 
 /*

_