mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] i386 boottime for_each_cpu broken
@ 2005-08-11  4:59 Zwane Mwaikambo
  2005-08-11  6:41 ` Bharata B Rao
  2005-08-11 10:54 ` Andi Kleen
  0 siblings, 2 replies; 7+ messages in thread
From: Zwane Mwaikambo @ 2005-08-11  4:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Linux Kernel, Andi Kleen

for_each_cpu walks through all processors in cpu_possible_map, which is 
defined as cpu_callout_map on i386 and isn't initialised until all 
processors have been booted. This breaks things which do for_each_cpu 
iterations early during boot. So, define cpu_possible_map as a bitmap with 
NR_CPUS bits populated. This was triggered by a patch i'm working on which 
does alloc_percpu before bringing up secondary processors.

 arch/i386/kernel/smpboot.c           |    1 +
 arch/i386/mach-voyager/voyager_smp.c |    1 +
 include/asm-i386/smp.h               |    2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

Signed-off-by: Zwane Mwaikambo <zwane@arm.linux.org.uk>

Index: linux-2.6.13-rc5-mm1/arch/i386/kernel/smpboot.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.13-rc5-mm1/arch/i386/kernel/smpboot.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 smpboot.c
--- linux-2.6.13-rc5-mm1/arch/i386/kernel/smpboot.c	7 Aug 2005 21:38:03 -0000	1.1.1.1
+++ linux-2.6.13-rc5-mm1/arch/i386/kernel/smpboot.c	11 Aug 2005 04:26:06 -0000
@@ -87,6 +87,7 @@ EXPORT_SYMBOL(cpu_online_map);
 
 cpumask_t cpu_callin_map;
 cpumask_t cpu_callout_map;
+cpumask_t cpu_possible_map = CPU_MASK_ALL;
 EXPORT_SYMBOL(cpu_callout_map);
 static cpumask_t smp_commenced_mask;
 
Index: linux-2.6.13-rc5-mm1/arch/i386/mach-voyager/voyager_smp.c
===================================================================
RCS file: /home/cvsroot/linux-2.6.13-rc5-mm1/arch/i386/mach-voyager/voyager_smp.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 voyager_smp.c
--- linux-2.6.13-rc5-mm1/arch/i386/mach-voyager/voyager_smp.c	7 Aug 2005 21:38:04 -0000	1.1.1.1
+++ linux-2.6.13-rc5-mm1/arch/i386/mach-voyager/voyager_smp.c	11 Aug 2005 04:26:29 -0000
@@ -241,6 +241,7 @@ static cpumask_t smp_commenced_mask = CP
 /* This is for the new dynamic CPU boot code */
 cpumask_t cpu_callin_map = CPU_MASK_NONE;
 cpumask_t cpu_callout_map = CPU_MASK_NONE;
+cpumask_t cpu_possible_map = CPU_MASK_ALL;
 EXPORT_SYMBOL(cpu_callout_map);
 
 /* The per processor IRQ masks (these are usually kept in sync) */
Index: linux-2.6.13-rc5-mm1/include/asm-i386/smp.h
===================================================================
RCS file: /home/cvsroot/linux-2.6.13-rc5-mm1/include/asm-i386/smp.h,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 smp.h
--- linux-2.6.13-rc5-mm1/include/asm-i386/smp.h	7 Aug 2005 21:38:37 -0000	1.1.1.1
+++ linux-2.6.13-rc5-mm1/include/asm-i386/smp.h	11 Aug 2005 04:25:26 -0000
@@ -59,7 +59,7 @@ extern void cpu_uninit(void);
 
 extern cpumask_t cpu_callout_map;
 extern cpumask_t cpu_callin_map;
-#define cpu_possible_map cpu_callout_map
+extern cpumask_t cpu_possible_map;
 
 /* We don't mark CPUs online until __cpu_up(), so we need another measure */
 static inline int num_booting_cpus(void)

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <200509050815.j858FLxR027791@hera.kernel.org>]

end of thread, other threads:[~2005-09-09  7:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11  4:59 [PATCH] i386 boottime for_each_cpu broken Zwane Mwaikambo
2005-08-11  6:41 ` Bharata B Rao
2005-08-11 21:33   ` Zwane Mwaikambo
2005-08-11 10:54 ` Andi Kleen
2005-08-11 17:44   ` Zwane Mwaikambo
     [not found] <200509050815.j858FLxR027791@hera.kernel.org>
2005-09-09  7:26 ` Andrew Morton
2005-09-09  7:43   ` Zwane Mwaikambo

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

all inboxes | Powered by JetHome®