[POWERPC] Make emergency stack safe for current_thread_info() use
[linux-2.6-block.git] / arch / powerpc / kernel / setup_64.c
index dff6308d1b5eb524f44fbaf5dfa0a0866e5e58b5..25e3fd8606ab589ebae8ee51143e39a517d32505 100644 (file)
@@ -487,9 +487,12 @@ static void __init emergency_stack_init(void)
         */
        limit = min(0x10000000UL, lmb.rmo_size);
 
-       for_each_possible_cpu(i)
-               paca[i].emergency_sp =
-               __va(lmb_alloc_base(HW_PAGE_SIZE, 128, limit)) + HW_PAGE_SIZE;
+       for_each_possible_cpu(i) {
+               unsigned long sp;
+               sp  = lmb_alloc_base(THREAD_SIZE, THREAD_SIZE, limit);
+               sp += THREAD_SIZE;
+               paca[i].emergency_sp = __va(sp);
+       }
 }
 
 /*