]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] ppc64: Fix UP kernel build
authorOlof Johansson <olof@lixom.net>
Thu, 4 Aug 2005 19:53:29 +0000 (12:53 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 4 Aug 2005 20:00:53 +0000 (13:00 -0700)
CONFIG_KEXEC breaks UP builds because of a misspelled smp_release_cpus().
Also, the function isn't defined unless built with CONFIG_SMP but it is
needed if we are to go from a UP to SMP kernel.  Enable it and document it.

Thanks to Steven Winiecki for reporting this and to Milton for remembering
how it's supposed to work and why.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ppc64/kernel/head.S
arch/ppc64/kernel/machine_kexec.c

index 74fc3bc68604715e23929a7b33457c280688f0b6..784f56d4684c5772a1939815095c81495c75d1ac 100644 (file)
@@ -2071,7 +2071,7 @@ _GLOBAL(hmt_start_secondary)
        blr
 #endif
 
-#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES)
+#if defined(CONFIG_KEXEC) || (defined(CONFIG_SMP) && !defined(CONFIG_PPC_ISERIES))
 _GLOBAL(smp_release_cpus)
        /* All secondary cpus are spinning on a common
         * spinloop, release them all now so they can start
index fdb2fc649d72ce05d323f98c2147e4c8bb6fcd0c..5c40bb6788df599c9b9c2d910ce2c647483b8334 100644 (file)
@@ -243,13 +243,17 @@ static void kexec_prepare_cpus(void)
 
 static void kexec_prepare_cpus(void)
 {
+       extern void smp_release_cpus(void);
        /*
         * move the secondarys to us so that we can copy
         * the new kernel 0-0x100 safely
         *
         * do this if kexec in setup.c ?
+        *
+        * We need to release the cpus if we are ever going from an
+        * UP to an SMP kernel.
         */
-       smp_relase_cpus();
+       smp_release_cpus();
        if (ppc_md.cpu_irq_down)
                ppc_md.cpu_irq_down();
        local_irq_disable();