Skip to contentSkip to conversation

x86: fix show cpuinfo cpu number always zero

PATCH New [email protected] 1 participant 2 messages Dec 18, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover x86: fix show cpuinfo cpu number always zero

It appears that this patch is missing from the latest 2.6.24 git kernel as well as the 2.6.24-rc5-mm1 patch?

Quoted 6 lines

Mike, This issue still seems to be present in linus git tree. Perhaps the fix in -mm not pushed to mainline yet.

Can you please raise the flag with Andrew, so that he can push it before 2.6.24 gets out

Signature · 5 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
#1 lore raw

PATCH 1/1 x86: fix show cpuinfo cpu number always zero

This fix corrects the problem that early_identify_cpu() sets cpu_index to '0' (needed when called by setup_arch) after smp_store_cpu_info() had set it to the correct value.

The error shows up in 'cat /proc/cpuinfo' will all cpus = 0.

---
 arch/x86/kernel/smpboot_64.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/smpboot_64.c +1 -1
@@ -141,8 +141,8 @@ static void __cpuinit smp_store_cpu_info
 	struct cpuinfo_x86 *c = &cpu_data(id);
 
 	*c = boot_cpu_data;
-	c->cpu_index = id;
 	identify_cpu(c);
+	c->cpu_index = id;
 	print_cpu_info(c);
 }
 
Signature · 5 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>