]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
powerpc/pmac: Fix SMP kernels on pre-core99 UP machines
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 9 Dec 2011 04:06:18 +0000 (15:06 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Mar 2012 18:21:23 +0000 (11:21 -0700)
commit 78c5c68a4cf4329d17abfa469345ddf323d4fd62 upstream.

The code for "powersurge" SMP would kick in and cause a crash
at boot due to the lack of a NULL test.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeremy Kerr <jeremy.kerr@canonical.com>
Reported-by: Adam Conrad <adconrad@ubuntu.com>
Tested-by: Adam Conrad <adconrad@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/platforms/powermac/smp.c

index 9b6a820bdd7dccb7f618f325206eec324b058d95..3394254f305fe2f90e46f9ed1a5ba41be78fad22 100644 (file)
@@ -414,7 +414,7 @@ static struct irqaction psurge_irqaction = {
 
 static void __init smp_psurge_setup_cpu(int cpu_nr)
 {
-       if (cpu_nr != 0)
+       if (cpu_nr != 0 || !psurge_start)
                return;
 
        /* reset the entry point so if we get another intr we won't