]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/setup_64.c
powerpc/book3e-64/kexec: Enable SMP release
[karo-tx-linux.git] / arch / powerpc / kernel / setup_64.c
index 505ec2c698e06a24ee34237d76f4fa14c1cad1b5..5c03a6a9b0542fac3d042f2481f367aae9178d38 100644 (file)
@@ -340,11 +340,26 @@ void early_setup_secondary(void)
 #endif /* CONFIG_SMP */
 
 #if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
+static bool use_spinloop(void)
+{
+       if (!IS_ENABLED(CONFIG_PPC_BOOK3E))
+               return true;
+
+       /*
+        * When book3e boots from kexec, the ePAPR spin table does
+        * not get used.
+        */
+       return of_property_read_bool(of_chosen, "linux,booted-from-kexec");
+}
+
 void smp_release_cpus(void)
 {
        unsigned long *ptr;
        int i;
 
+       if (!use_spinloop())
+               return;
+
        DBG(" -> smp_release_cpus()\n");
 
        /* All secondary cpus are spinning on a common spinloop, release them
@@ -524,7 +539,7 @@ void __init setup_system(void)
         * Freescale Book3e parts spin in a loop provided by firmware,
         * so smp_release_cpus() does nothing for them
         */
-#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_FSL_BOOK3E)
+#if defined(CONFIG_SMP)
        /* Release secondary cpus out of their spinloops at 0x60 now that
         * we can map physical -> logical CPU ids
         */