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.c34
1 files changed, 29 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 1f6816003ebe..87df51720641 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -62,6 +62,7 @@
62#include <asm/udbg.h> 62#include <asm/udbg.h>
63#include <asm/kexec.h> 63#include <asm/kexec.h>
64#include <asm/swiotlb.h> 64#include <asm/swiotlb.h>
65#include <asm/mmu_context.h>
65 66
66#include "setup.h" 67#include "setup.h"
67 68
@@ -142,11 +143,14 @@ early_param("smt-enabled", early_smt_enabled);
142#define check_smt_enabled() 143#define check_smt_enabled()
143#endif /* CONFIG_SMP */ 144#endif /* CONFIG_SMP */
144 145
145/* Put the paca pointer into r13 and SPRG3 */ 146/* Put the paca pointer into r13 and SPRG_PACA */
146void __init setup_paca(int cpu) 147void __init setup_paca(int cpu)
147{ 148{
148 local_paca = &paca[cpu]; 149 local_paca = &paca[cpu];
149 mtspr(SPRN_SPRG3, local_paca); 150 mtspr(SPRN_SPRG_PACA, local_paca);
151#ifdef CONFIG_PPC_BOOK3E
152 mtspr(SPRN_SPRG_TLB_EXFRAME, local_paca->extlb);
153#endif
150} 154}
151 155
152/* 156/*
@@ -230,9 +234,6 @@ void early_setup_secondary(void)
230#endif /* CONFIG_SMP */ 234#endif /* CONFIG_SMP */
231 235
232#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) 236#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
233extern unsigned long __secondary_hold_spinloop;
234extern void generic_secondary_smp_init(void);
235
236void smp_release_cpus(void) 237void smp_release_cpus(void)
237{ 238{
238 unsigned long *ptr; 239 unsigned long *ptr;
@@ -453,6 +454,24 @@ static void __init irqstack_early_init(void)
453#define irqstack_early_init() 454#define irqstack_early_init()
454#endif 455#endif
455 456
457#ifdef CONFIG_PPC_BOOK3E
458static void __init exc_lvl_early_init(void)
459{
460 unsigned int i;
461
462 for_each_possible_cpu(i) {
463 critirq_ctx[i] = (struct thread_info *)
464 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
465 dbgirq_ctx[i] = (struct thread_info *)
466 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
467 mcheckirq_ctx[i] = (struct thread_info *)
468 __va(lmb_alloc(THREAD_SIZE, THREAD_SIZE));
469 }
470}
471#else
472#define exc_lvl_early_init()
473#endif
474
456/* 475/*
457 * Stack space used when we detect a bad kernel stack pointer, and 476 * Stack space used when we detect a bad kernel stack pointer, and
458 * early in SMP boots before relocation is enabled. 477 * early in SMP boots before relocation is enabled.
@@ -512,6 +531,7 @@ void __init setup_arch(char **cmdline_p)
512 init_mm.brk = klimit; 531 init_mm.brk = klimit;
513 532
514 irqstack_early_init(); 533 irqstack_early_init();
534 exc_lvl_early_init();
515 emergency_stack_init(); 535 emergency_stack_init();
516 536
517#ifdef CONFIG_PPC_STD_MMU_64 537#ifdef CONFIG_PPC_STD_MMU_64
@@ -534,6 +554,10 @@ void __init setup_arch(char **cmdline_p)
534#endif 554#endif
535 555
536 paging_init(); 556 paging_init();
557
558 /* Initialize the MMU context management stuff */
559 mmu_context_init();
560
537 ppc64_boot_msg(0x15, "Setup Done"); 561 ppc64_boot_msg(0x15, "Setup Done");
538} 562}
539 563