powerpc: Don't try to set LPCR unless we're in hypervisor mode
[linux.git] / arch / powerpc / kernel / setup_64.c
index 3d7a50a08f5e17d080f701ff4a14a39da39aa6a1..fbe24377eda3e4f268d6074e0803dd0891c8c416 100644 (file)
@@ -201,7 +201,8 @@ static void cpu_ready_for_interrupts(void)
        get_paca()->kernel_msr = MSR_KERNEL;
 
        /* Enable AIL if supported */
-       if (cpu_has_feature(CPU_FTR_ARCH_207S)) {
+       if (cpu_has_feature(CPU_FTR_HVMODE) &&
+           cpu_has_feature(CPU_FTR_ARCH_207S)) {
                unsigned long lpcr = mfspr(SPRN_LPCR);
                mtspr(SPRN_LPCR, lpcr | LPCR_AIL_3);
        }