diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 07:24:54 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:27 -0500 |
commit | cb8cc442dc7e07cb5438b357843ab4095ad73933 (patch) | |
tree | d818d1814507b2fe71f1e07c4bc108fe0c9ebb91 /arch/x86/kernel | |
parent | d4c9a9f3d416cfa1f5ffbe09d864d069467fe693 (diff) |
x86, apic: refactor ->phys_pkg_id()
Refactor the ->phys_pkg_id() methods:
- namespace separation
- macro wrapper removal
- open-coded calls to the methods in the generic code
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r-- | arch/x86/kernel/cpu/addon_cpuid_features.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index 84f8e4a5aef7..e8bb892c09fd 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c | |||
@@ -116,13 +116,13 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) | |||
116 | 116 | ||
117 | core_select_mask = (~(-1 << core_plus_mask_width)) >> ht_mask_width; | 117 | core_select_mask = (~(-1 << core_plus_mask_width)) >> ht_mask_width; |
118 | 118 | ||
119 | c->cpu_core_id = phys_pkg_id(c->initial_apicid, ht_mask_width) | 119 | c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, ht_mask_width) |
120 | & core_select_mask; | 120 | & core_select_mask; |
121 | c->phys_proc_id = phys_pkg_id(c->initial_apicid, core_plus_mask_width); | 121 | c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, core_plus_mask_width); |
122 | /* | 122 | /* |
123 | * Reinit the apicid, now that we have extended initial_apicid. | 123 | * Reinit the apicid, now that we have extended initial_apicid. |
124 | */ | 124 | */ |
125 | c->apicid = phys_pkg_id(c->initial_apicid, 0); | 125 | c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); |
126 | 126 | ||
127 | c->x86_max_cores = (core_level_siblings / smp_num_siblings); | 127 | c->x86_max_cores = (core_level_siblings / smp_num_siblings); |
128 | 128 | ||
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index 93c491c4fe7f..055b9c3a6600 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c | |||
@@ -442,7 +442,7 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
442 | } | 442 | } |
443 | 443 | ||
444 | index_msb = get_count_order(smp_num_siblings); | 444 | index_msb = get_count_order(smp_num_siblings); |
445 | c->phys_proc_id = phys_pkg_id(c->initial_apicid, index_msb); | 445 | c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, index_msb); |
446 | 446 | ||
447 | smp_num_siblings = smp_num_siblings / c->x86_max_cores; | 447 | smp_num_siblings = smp_num_siblings / c->x86_max_cores; |
448 | 448 | ||
@@ -450,7 +450,7 @@ void __cpuinit detect_ht(struct cpuinfo_x86 *c) | |||
450 | 450 | ||
451 | core_bits = get_count_order(c->x86_max_cores); | 451 | core_bits = get_count_order(c->x86_max_cores); |
452 | 452 | ||
453 | c->cpu_core_id = phys_pkg_id(c->initial_apicid, index_msb) & | 453 | c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, index_msb) & |
454 | ((1 << core_bits) - 1); | 454 | ((1 << core_bits) - 1); |
455 | } | 455 | } |
456 | 456 | ||
@@ -686,7 +686,7 @@ static void __cpuinit generic_identify(struct cpuinfo_x86 *c) | |||
686 | c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF; | 686 | c->initial_apicid = (cpuid_ebx(1) >> 24) & 0xFF; |
687 | #ifdef CONFIG_X86_32 | 687 | #ifdef CONFIG_X86_32 |
688 | # ifdef CONFIG_X86_HT | 688 | # ifdef CONFIG_X86_HT |
689 | c->apicid = phys_pkg_id(c->initial_apicid, 0); | 689 | c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); |
690 | # else | 690 | # else |
691 | c->apicid = c->initial_apicid; | 691 | c->apicid = c->initial_apicid; |
692 | # endif | 692 | # endif |
@@ -733,7 +733,7 @@ static void __cpuinit identify_cpu(struct cpuinfo_x86 *c) | |||
733 | this_cpu->c_identify(c); | 733 | this_cpu->c_identify(c); |
734 | 734 | ||
735 | #ifdef CONFIG_X86_64 | 735 | #ifdef CONFIG_X86_64 |
736 | c->apicid = phys_pkg_id(c->initial_apicid, 0); | 736 | c->apicid = apic->phys_pkg_id(c->initial_apicid, 0); |
737 | #endif | 737 | #endif |
738 | 738 | ||
739 | /* | 739 | /* |