diff options
author | Rohit Seth <rohitseth@google.com> | 2006-06-26 07:58:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:48:19 -0400 |
commit | f3fa8ebc25129bb69929e20b0c84049c39029d8d (patch) | |
tree | 56b0df80a38128ca91a2e613d30c594e2e54f7c7 /arch/x86_64/kernel/smpboot.c | |
parent | e465058d55a88feb4c7ecabe63eea7ea7147e206 (diff) |
[PATCH] x86_64: moving phys_proc_id and cpu_core_id to cpuinfo_x86
Most of the fields of cpuinfo are defined in cpuinfo_x86 structure.
This patch moves the phys_proc_id and cpu_core_id for each processor to
cpuinfo_x86 structure as well.
Signed-off-by: Rohit Seth <rohitseth@google.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/smpboot.c')
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 06535e7687ce..b1c10b154bfe 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -63,10 +63,6 @@ | |||
63 | 63 | ||
64 | /* Number of siblings per CPU package */ | 64 | /* Number of siblings per CPU package */ |
65 | int smp_num_siblings = 1; | 65 | int smp_num_siblings = 1; |
66 | /* Package ID of each logical CPU */ | ||
67 | u8 phys_proc_id[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID }; | ||
68 | /* core ID of each logical CPU */ | ||
69 | u8 cpu_core_id[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = BAD_APICID }; | ||
70 | 66 | ||
71 | /* Last level cache ID of each logical CPU */ | 67 | /* Last level cache ID of each logical CPU */ |
72 | u8 cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; | 68 | u8 cpu_llc_id[NR_CPUS] __cpuinitdata = {[0 ... NR_CPUS-1] = BAD_APICID}; |
@@ -472,8 +468,8 @@ static inline void set_cpu_sibling_map(int cpu) | |||
472 | 468 | ||
473 | if (smp_num_siblings > 1) { | 469 | if (smp_num_siblings > 1) { |
474 | for_each_cpu_mask(i, cpu_sibling_setup_map) { | 470 | for_each_cpu_mask(i, cpu_sibling_setup_map) { |
475 | if (phys_proc_id[cpu] == phys_proc_id[i] && | 471 | if (c[cpu].phys_proc_id == c[i].phys_proc_id && |
476 | cpu_core_id[cpu] == cpu_core_id[i]) { | 472 | c[cpu].cpu_core_id == c[i].cpu_core_id) { |
477 | cpu_set(i, cpu_sibling_map[cpu]); | 473 | cpu_set(i, cpu_sibling_map[cpu]); |
478 | cpu_set(cpu, cpu_sibling_map[i]); | 474 | cpu_set(cpu, cpu_sibling_map[i]); |
479 | cpu_set(i, cpu_core_map[cpu]); | 475 | cpu_set(i, cpu_core_map[cpu]); |
@@ -500,7 +496,7 @@ static inline void set_cpu_sibling_map(int cpu) | |||
500 | cpu_set(i, c[cpu].llc_shared_map); | 496 | cpu_set(i, c[cpu].llc_shared_map); |
501 | cpu_set(cpu, c[i].llc_shared_map); | 497 | cpu_set(cpu, c[i].llc_shared_map); |
502 | } | 498 | } |
503 | if (phys_proc_id[cpu] == phys_proc_id[i]) { | 499 | if (c[cpu].phys_proc_id == c[i].phys_proc_id) { |
504 | cpu_set(i, cpu_core_map[cpu]); | 500 | cpu_set(i, cpu_core_map[cpu]); |
505 | cpu_set(cpu, cpu_core_map[i]); | 501 | cpu_set(cpu, cpu_core_map[i]); |
506 | /* | 502 | /* |
@@ -1201,8 +1197,8 @@ static void remove_siblinginfo(int cpu) | |||
1201 | cpu_clear(cpu, cpu_sibling_map[sibling]); | 1197 | cpu_clear(cpu, cpu_sibling_map[sibling]); |
1202 | cpus_clear(cpu_sibling_map[cpu]); | 1198 | cpus_clear(cpu_sibling_map[cpu]); |
1203 | cpus_clear(cpu_core_map[cpu]); | 1199 | cpus_clear(cpu_core_map[cpu]); |
1204 | phys_proc_id[cpu] = BAD_APICID; | 1200 | c[cpu].phys_proc_id = 0; |
1205 | cpu_core_id[cpu] = BAD_APICID; | 1201 | c[cpu].cpu_core_id = 0; |
1206 | cpu_clear(cpu, cpu_sibling_setup_map); | 1202 | cpu_clear(cpu, cpu_sibling_setup_map); |
1207 | } | 1203 | } |
1208 | 1204 | ||