powerpc/powerpnv: Properly handle failure starting CPUs
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 3 May 2013 17:21:00 +0000 (17:21 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Sun, 5 May 2013 23:25:41 +0000 (09:25 +1000)
If OPAL returns an error, propagate it upward rather than spinning
seconds waiting for a CPU that will never show up

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/powernv/smp.c

index 0bdc735db16f41e27d1d2b3e58320060a5b9cc03..6a3ecca5b7253e5dafe06f488f393eeb7c439186 100644 (file)
@@ -77,9 +77,11 @@ int pnv_smp_kick_cpu(int nr)
        if (!paca[nr].cpu_start && firmware_has_feature(FW_FEATURE_OPALv2)) {
                pr_devel("OPAL: Starting CPU %d (HW 0x%x)...\n", nr, pcpu);
                rc = opal_start_cpu(pcpu, start_here);
-               if (rc != OPAL_SUCCESS)
+               if (rc != OPAL_SUCCESS) {
                        pr_warn("OPAL Error %ld starting CPU %d\n",
                                rc, nr);
+                       return -ENODEV;
+               }
        }
        return smp_generic_kick_cpu(nr);
 }