Browse Source

[PATCH] x86_64: Minor clean up to CPU setup - use smp_processor_id instead of custom hack

Does not change any semantics because numa_add_cpu checks for CPU 0 anyways.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen 20 years ago
parent
commit
3019e8ebe6
1 changed files with 1 additions and 2 deletions
  1. 1 2
      arch/x86_64/kernel/setup.c

+ 1 - 2
arch/x86_64/kernel/setup.c

@@ -1081,8 +1081,7 @@ void __cpuinit identify_cpu(struct cpuinfo_x86 *c)
 	else
 		mtrr_ap_init();
 #ifdef CONFIG_NUMA
-	if (c != &boot_cpu_data)
-		numa_add_cpu(c - cpu_data);
+	numa_add_cpu(smp_processor_id());
 #endif
 }