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.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 6568406b2a30..63547394048c 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -144,9 +144,9 @@ early_param("smt-enabled", early_smt_enabled);
144#endif /* CONFIG_SMP */ 144#endif /* CONFIG_SMP */
145 145
146/* Put the paca pointer into r13 and SPRG_PACA */ 146/* Put the paca pointer into r13 and SPRG_PACA */
147void __init setup_paca(int cpu) 147static void __init setup_paca(struct paca_struct *new_paca)
148{ 148{
149 local_paca = &paca[cpu]; 149 local_paca = new_paca;
150 mtspr(SPRN_SPRG_PACA, local_paca); 150 mtspr(SPRN_SPRG_PACA, local_paca);
151#ifdef CONFIG_PPC_BOOK3E 151#ifdef CONFIG_PPC_BOOK3E
152 mtspr(SPRN_SPRG_TLB_EXFRAME, local_paca->extlb); 152 mtspr(SPRN_SPRG_TLB_EXFRAME, local_paca->extlb);
@@ -176,14 +176,12 @@ void __init early_setup(unsigned long dt_ptr)
176{ 176{
177 /* -------- printk is _NOT_ safe to use here ! ------- */ 177 /* -------- printk is _NOT_ safe to use here ! ------- */
178 178
179 /* Fill in any unititialised pacas */
180 initialise_pacas();
181
182 /* Identify CPU type */ 179 /* Identify CPU type */
183 identify_cpu(0, mfspr(SPRN_PVR)); 180 identify_cpu(0, mfspr(SPRN_PVR));
184 181
185 /* Assume we're on cpu 0 for now. Don't write to the paca yet! */ 182 /* Assume we're on cpu 0 for now. Don't write to the paca yet! */
186 setup_paca(0); 183 initialise_paca(&boot_paca, 0);
184 setup_paca(&boot_paca);
187 185
188 /* Initialize lockdep early or else spinlocks will blow */ 186 /* Initialize lockdep early or else spinlocks will blow */
189 lockdep_init(); 187 lockdep_init();
@@ -203,7 +201,7 @@ void __init early_setup(unsigned long dt_ptr)
203 early_init_devtree(__va(dt_ptr)); 201 early_init_devtree(__va(dt_ptr));
204 202
205 /* Now we know the logical id of our boot cpu, setup the paca. */ 203 /* Now we know the logical id of our boot cpu, setup the paca. */
206 setup_paca(boot_cpuid); 204 setup_paca(&paca[boot_cpuid]);
207 205
208 /* Fix up paca fields required for the boot cpu */ 206 /* Fix up paca fields required for the boot cpu */
209 get_paca()->cpu_start = 1; 207 get_paca()->cpu_start = 1;