aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/setup_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/setup_64.c')
-rw-r--r--arch/powerpc/kernel/setup_64.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 4085aaa9478f..2232aff66059 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -520,9 +520,6 @@ static void __init irqstack_early_init(void)
520#ifdef CONFIG_PPC_BOOK3E 520#ifdef CONFIG_PPC_BOOK3E
521static void __init exc_lvl_early_init(void) 521static void __init exc_lvl_early_init(void)
522{ 522{
523 extern unsigned int interrupt_base_book3e;
524 extern unsigned int exc_debug_debug_book3e;
525
526 unsigned int i; 523 unsigned int i;
527 524
528 for_each_possible_cpu(i) { 525 for_each_possible_cpu(i) {
@@ -535,8 +532,7 @@ static void __init exc_lvl_early_init(void)
535 } 532 }
536 533
537 if (cpu_has_feature(CPU_FTR_DEBUG_LVL_EXC)) 534 if (cpu_has_feature(CPU_FTR_DEBUG_LVL_EXC))
538 patch_branch(&interrupt_base_book3e + (0x040 / 4) + 1, 535 patch_exception(0x040, exc_debug_debug_book3e);
539 (unsigned long)&exc_debug_debug_book3e, 0);
540} 536}
541#else 537#else
542#define exc_lvl_early_init() 538#define exc_lvl_early_init()
@@ -544,7 +540,8 @@ static void __init exc_lvl_early_init(void)
544 540
545/* 541/*
546 * Stack space used when we detect a bad kernel stack pointer, and 542 * Stack space used when we detect a bad kernel stack pointer, and
547 * early in SMP boots before relocation is enabled. 543 * early in SMP boots before relocation is enabled. Exclusive emergency
544 * stack for machine checks.
548 */ 545 */
549static void __init emergency_stack_init(void) 546static void __init emergency_stack_init(void)
550{ 547{
@@ -567,6 +564,13 @@ static void __init emergency_stack_init(void)
567 sp = memblock_alloc_base(THREAD_SIZE, THREAD_SIZE, limit); 564 sp = memblock_alloc_base(THREAD_SIZE, THREAD_SIZE, limit);
568 sp += THREAD_SIZE; 565 sp += THREAD_SIZE;
569 paca[i].emergency_sp = __va(sp); 566 paca[i].emergency_sp = __va(sp);
567
568#ifdef CONFIG_PPC_BOOK3S_64
569 /* emergency stack for machine check exception handling. */
570 sp = memblock_alloc_base(THREAD_SIZE, THREAD_SIZE, limit);
571 sp += THREAD_SIZE;
572 paca[i].mc_emergency_sp = __va(sp);
573#endif
570 } 574 }
571} 575}
572 576