public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PPC64: Fix UP kernel build
@ 2005-08-04  1:30 Olof Johansson
  2005-08-04 12:08 ` Andreas Schwab
  0 siblings, 1 reply; 2+ messages in thread
From: Olof Johansson @ 2005-08-04  1:30 UTC (permalink / raw)
  To: linux-kernel; +Cc: linuxppc64-dev, akpm, paulus, anton, miltonm

Hi,

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.

-Olof

Signed-off-by: Olof Johansson <olof@lixom.net>

Index: 2.6/arch/ppc64/kernel/machine_kexec.c
===================================================================
--- 2.6.orig/arch/ppc64/kernel/machine_kexec.c	2005-08-03 19:53:16.000000000 -0500
+++ 2.6/arch/ppc64/kernel/machine_kexec.c	2005-08-03 20:39:49.000000000 -0500
@@ -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();
Index: 2.6/arch/ppc64/kernel/head.S
===================================================================
--- 2.6.orig/arch/ppc64/kernel/head.S	2005-08-03 19:53:16.000000000 -0500
+++ 2.6/arch/ppc64/kernel/head.S	2005-08-03 20:37:22.000000000 -0500
@@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PPC64: Fix UP kernel build
  2005-08-04  1:30 [PATCH] PPC64: Fix UP kernel build Olof Johansson
@ 2005-08-04 12:08 ` Andreas Schwab
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Schwab @ 2005-08-04 12:08 UTC (permalink / raw)
  To: Olof Johansson; +Cc: linux-kernel, akpm, linuxppc64-dev, paulus, anton, miltonm

Olof Johansson <olof@lixom.net> writes:

> Index: 2.6/arch/ppc64/kernel/machine_kexec.c
> ===================================================================
> --- 2.6.orig/arch/ppc64/kernel/machine_kexec.c	2005-08-03 19:53:16.000000000 -0500
> +++ 2.6/arch/ppc64/kernel/machine_kexec.c	2005-08-03 20:39:49.000000000 -0500
> @@ -243,13 +243,17 @@ static void kexec_prepare_cpus(void)
>  
>  static void kexec_prepare_cpus(void)
>  {
> +	extern void smp_release_cpus(void);

Please put this in a header.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-04 12:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-04  1:30 [PATCH] PPC64: Fix UP kernel build Olof Johansson
2005-08-04 12:08 ` Andreas Schwab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox