[PATCH] Fix hotplug cpu on ppc64

Zwane Mwaikambo zwane at fsmlabs.com
Tue Dec 21 06:16:02 EST 2004


I seem to have broken this when i moved the clearing of the dying cpu to 
arch specific code.

Signed-off-by: Zwane Mwaikambo <zwane at fsmlabs.com>

Index: linux-2.6.10-rc3-mm1/arch/ppc64/kernel/pSeries_smp.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.10-rc3-mm1/arch/ppc64/kernel/pSeries_smp.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 pSeries_smp.c
--- linux-2.6.10-rc3-mm1/arch/ppc64/kernel/pSeries_smp.c	13 Dec 2004 14:26:53 -0000	1.1.1.1
+++ linux-2.6.10-rc3-mm1/arch/ppc64/kernel/pSeries_smp.c	20 Dec 2004 19:12:02 -0000
@@ -92,11 +92,13 @@ int __cpu_disable(void)
 {
 	/* FIXME: go put this in a header somewhere */
 	extern void xics_migrate_irqs_away(void);
+	int cpu = smp_processor_id();
 
+	cpu_clear(cpu, cpu_online_map);
 	systemcfg->processorCount--;
 
 	/*fix boot_cpuid here*/
-	if (smp_processor_id() == boot_cpuid)
+	if (cpu == boot_cpuid)
 		boot_cpuid = any_online_cpu(cpu_online_map);
 
 	/* FIXME: abstract this to not be platform specific later on */



More information about the Linuxppc64-dev mailing list