diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-28 06:43:18 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-28 17:20:25 -0500 |
commit | a27a621001f4c3e57caf47feff4b014577fd01c6 (patch) | |
tree | 0f14c4c8eaff3c11142672f16a63e7b6e42d81a7 /arch/x86/include/asm/mach-default | |
parent | d83093b50416f4ca59d3a84b2ddc217748214d64 (diff) |
x86: refactor ->check_phys_apicid_present() subarch methods
- spread out the namespace to per driver methods
- extend it to 64-bit as well so that we can use
apic->check_phys_apicid_present() unconditionally
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/mach-default')
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apic.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h index 54c20e19e280..0a824d3a2238 100644 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ b/arch/x86/include/asm/mach-default/mach_apic.h | |||
@@ -118,13 +118,26 @@ static inline int __default_cpu_present_to_apicid(int mps_cpu) | |||
118 | return BAD_APICID; | 118 | return BAD_APICID; |
119 | } | 119 | } |
120 | 120 | ||
121 | static inline int | ||
122 | __default_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
123 | { | ||
124 | return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); | ||
125 | } | ||
126 | |||
121 | #ifdef CONFIG_X86_32 | 127 | #ifdef CONFIG_X86_32 |
122 | static inline int default_cpu_present_to_apicid(int mps_cpu) | 128 | static inline int default_cpu_present_to_apicid(int mps_cpu) |
123 | { | 129 | { |
124 | return __default_cpu_present_to_apicid(mps_cpu); | 130 | return __default_cpu_present_to_apicid(mps_cpu); |
125 | } | 131 | } |
132 | |||
133 | static inline int | ||
134 | default_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
135 | { | ||
136 | return __default_check_phys_apicid_present(boot_cpu_physical_apicid); | ||
137 | } | ||
126 | #else | 138 | #else |
127 | extern int default_cpu_present_to_apicid(int mps_cpu); | 139 | extern int default_cpu_present_to_apicid(int mps_cpu); |
140 | extern int default_check_phys_apicid_present(int boot_cpu_physical_apicid); | ||
128 | #endif | 141 | #endif |
129 | 142 | ||
130 | static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | 143 | static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) |
@@ -132,11 +145,6 @@ static inline physid_mask_t default_apicid_to_cpu_present(int phys_apicid) | |||
132 | return physid_mask_of_physid(phys_apicid); | 145 | return physid_mask_of_physid(phys_apicid); |
133 | } | 146 | } |
134 | 147 | ||
135 | static inline int check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
136 | { | ||
137 | return physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map); | ||
138 | } | ||
139 | |||
140 | static inline void enable_apic_mode(void) | 148 | static inline void enable_apic_mode(void) |
141 | { | 149 | { |
142 | } | 150 | } |