Skip to contentSkip to conversation

x86: fix smp_num_siblings on buggy BIOSes

PATCH Siddha, Suresh B 2 participants 2 messages May 27, 2005 2 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 26 lines · Andrew Morton
Quoted 25 lines · Suresh B

Appended patch will fix 'smp_num_siblings' value on the systems with buggy bios, which sets number of siblings to '2' even when HT is disabled. (more details are at http://bugzilla.kernel.org/show_bug.cgi?id=4359)

I am planning to do more cleanup in this area (like moving smp_num_siblings to per cpuinfo) shortly.

But meanwhile, please pickup this patch for 2.6.12.

arch/i386/kernel/smpboot.c renamed from arch/i386/kernel/smpboot.c~ +3 -1
@@ -1074,8 +1074,10 @@
 			cpu_set(cpu, cpu_sibling_map[cpu]);
 		}
 
-		if (siblings != smp_num_siblings)
+		if (siblings != smp_num_siblings) {
 			printk(KERN_WARNING "WARNING: %d siblings found for CPU%d, should be %d\n", siblings, cpu, smp_num_siblings);
+			smp_num_siblings = siblings;
+		}
 
Quoted 8 lines

arch/i386/kernel/smpboot.c line 1083

Quoted 2 lines
arch/i386/kernel/smpboot.c renamed from arch/i386/kernel/smpboot.c~ +0 -0
 		if (c->x86_num_cores > 1) {
 			for (i = 0; i < NR_CPUS; i++) {

OK, but be aware that -mm's sibling-map-initializing-rework.patch cheerfully deletes all the surrounding code. So -mm will not have this fix.

There's a completely loony amount of x86 stuff in -mm.

Thanks for this info. I will send a fix for -mm also.

BTW, when do you plan to integrate x86 cpu hotplug patches to mainline? Depending on that I will plan my "smp_num_siblings" global cleanup.

thanks,
suresh

#3 lore raw
Quoted 2 lines · Suresh B

BTW, when do you plan to integrate x86 cpu hotplug patches to mainline?

I guess after the various subsystem trees have merged their stuff post-2.6.12 (I tend to wait until after they've merged, although sometimes people are slow and I get bored). Say, 1-2 weeks after 2.6.12 is released. And I'd guess 2.6.12 is 1-2 weeks away.

Quoted 1 line

Depending on that I will plan my "smp_num_siblings" global cleanup.

gack, OK. The kexec patches are a major source of x86 churn. I don't know if we'll be merging all the kexec stuff for 2.6.13. Probably we will.