aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/paca.c3
-rw-r--r--arch/powerpc/kernel/setup_64.c15
2 files changed, 17 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index bf0aada02fe4..ad302f845e5d 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -152,7 +152,8 @@ void __init initialise_paca(struct paca_struct *new_paca, int cpu)
152 new_paca->paca_index = cpu; 152 new_paca->paca_index = cpu;
153 new_paca->kernel_toc = kernel_toc; 153 new_paca->kernel_toc = kernel_toc;
154 new_paca->kernelbase = (unsigned long) _stext; 154 new_paca->kernelbase = (unsigned long) _stext;
155 new_paca->kernel_msr = MSR_KERNEL; 155 /* Only set MSR:IR/DR when MMU is initialized */
156 new_paca->kernel_msr = MSR_KERNEL & ~(MSR_IR | MSR_DR);
156 new_paca->hw_cpu_id = 0xffff; 157 new_paca->hw_cpu_id = 0xffff;
157 new_paca->kexec_state = KEXEC_STATE_NONE; 158 new_paca->kexec_state = KEXEC_STATE_NONE;
158 new_paca->__current = &init_task; 159 new_paca->__current = &init_task;
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index d8aabbdc6483..1d33e817ab2d 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -261,6 +261,14 @@ void __init early_setup(unsigned long dt_ptr)
261 /* Initialize the hash table or TLB handling */ 261 /* Initialize the hash table or TLB handling */
262 early_init_mmu(); 262 early_init_mmu();
263 263
264 /*
265 * At this point, we can let interrupts switch to virtual mode
266 * (the MMU has been setup), so adjust the MSR in the PACA to
267 * have IR and DR set.
268 */
269 get_paca()->kernel_msr = MSR_KERNEL;
270
271 /* Reserve large chunks of memory for use by CMA for KVM */
264 kvm_cma_reserve(); 272 kvm_cma_reserve();
265 273
266 /* 274 /*
@@ -293,6 +301,13 @@ void early_setup_secondary(void)
293 301
294 /* Initialize the hash table or TLB handling */ 302 /* Initialize the hash table or TLB handling */
295 early_init_mmu_secondary(); 303 early_init_mmu_secondary();
304
305 /*
306 * At this point, we can let interrupts switch to virtual mode
307 * (the MMU has been setup), so adjust the MSR in the PACA to
308 * have IR and DR set.
309 */
310 get_paca()->kernel_msr = MSR_KERNEL;
296} 311}
297 312
298#endif /* CONFIG_SMP */ 313#endif /* CONFIG_SMP */