]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/setup_64.c
powerpc/64: Fix setting of AIL in hypervisor mode
[karo-tx-linux.git] / arch / powerpc / kernel / setup_64.c
index 7ac8e6eaab5ba24566f1f6fe06829e22727e86ea..8d586cff8a41f7e95b9ec7fc44b7126a4904c9dc 100644 (file)
@@ -226,17 +226,25 @@ static void __init configure_exceptions(void)
                if (firmware_has_feature(FW_FEATURE_OPAL))
                        opal_configure_cores();
 
-               /* Enable AIL if supported, and we are in hypervisor mode */
-               if (early_cpu_has_feature(CPU_FTR_HVMODE) &&
-                   early_cpu_has_feature(CPU_FTR_ARCH_207S)) {
-                       unsigned long lpcr = mfspr(SPRN_LPCR);
-                       mtspr(SPRN_LPCR, lpcr | LPCR_AIL_3);
-               }
+               /* AIL on native is done in cpu_ready_for_interrupts() */
        }
 }
 
 static void cpu_ready_for_interrupts(void)
 {
+       /*
+        * Enable AIL if supported, and we are in hypervisor mode. This
+        * is called once for every processor.
+        *
+        * If we are not in hypervisor mode the job is done once for
+        * the whole partition in configure_exceptions().
+        */
+       if (early_cpu_has_feature(CPU_FTR_HVMODE) &&
+           early_cpu_has_feature(CPU_FTR_ARCH_207S)) {
+               unsigned long lpcr = mfspr(SPRN_LPCR);
+               mtspr(SPRN_LPCR, lpcr | LPCR_AIL_3);
+       }
+
        /* Set IR and DR in PACA MSR */
        get_paca()->kernel_msr = MSR_KERNEL;
 }