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/cpu/common.c | |
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/cpu/common.c')
-rw-r--r-- | arch/x86/kernel/cpu/common.c | 8 |
1 files changed, 4 insertions, 4 deletions
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 | /* |