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/include/asm | |
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/include/asm')
-rw-r--r-- | arch/x86/include/asm/bigsmp/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/es7000/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-default/mach_apic.h | 3 | ||||
-rw-r--r-- | arch/x86/include/asm/mach-generic/mach_apic.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/numaq/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/summit/apic.h | 2 |
6 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h index b7cba5b5635b..1230f5d7a38e 100644 --- a/arch/x86/include/asm/bigsmp/apic.h +++ b/arch/x86/include/asm/bigsmp/apic.h | |||
@@ -133,7 +133,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
133 | return BAD_APICID; | 133 | return BAD_APICID; |
134 | } | 134 | } |
135 | 135 | ||
136 | static inline int phys_pkg_id(int cpuid_apic, int index_msb) | 136 | static inline int bigsmp_phys_pkg_id(int cpuid_apic, int index_msb) |
137 | { | 137 | { |
138 | return cpuid_apic >> index_msb; | 138 | return cpuid_apic >> index_msb; |
139 | } | 139 | } |
diff --git a/arch/x86/include/asm/es7000/apic.h b/arch/x86/include/asm/es7000/apic.h index d2c6c202e8bd..f183dfb4de4a 100644 --- a/arch/x86/include/asm/es7000/apic.h +++ b/arch/x86/include/asm/es7000/apic.h | |||
@@ -221,7 +221,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, | |||
221 | return apicid; | 221 | return apicid; |
222 | } | 222 | } |
223 | 223 | ||
224 | static inline int phys_pkg_id(int cpuid_apic, int index_msb) | 224 | static inline int es7000_phys_pkg_id(int cpuid_apic, int index_msb) |
225 | { | 225 | { |
226 | return cpuid_apic >> index_msb; | 226 | return cpuid_apic >> index_msb; |
227 | } | 227 | } |
diff --git a/arch/x86/include/asm/mach-default/mach_apic.h b/arch/x86/include/asm/mach-default/mach_apic.h index 55797a35150f..d0605281a6b7 100644 --- a/arch/x86/include/asm/mach-default/mach_apic.h +++ b/arch/x86/include/asm/mach-default/mach_apic.h | |||
@@ -21,7 +21,6 @@ static inline const struct cpumask *default_target_cpus(void) | |||
21 | #include <asm/genapic.h> | 21 | #include <asm/genapic.h> |
22 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) | 22 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) |
23 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) | 23 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) |
24 | #define phys_pkg_id (apic->phys_pkg_id) | ||
25 | #define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID))) | 24 | #define read_apic_id() (GET_APIC_ID(apic_read(APIC_ID))) |
26 | #define send_IPI_self (apic->send_IPI_self) | 25 | #define send_IPI_self (apic->send_IPI_self) |
27 | #define wakeup_secondary_cpu (apic->wakeup_cpu) | 26 | #define wakeup_secondary_cpu (apic->wakeup_cpu) |
@@ -65,7 +64,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
65 | return (unsigned int)(mask1 & mask2 & mask3); | 64 | return (unsigned int)(mask1 & mask2 & mask3); |
66 | } | 65 | } |
67 | 66 | ||
68 | static inline int phys_pkg_id(int cpuid_apic, int index_msb) | 67 | static inline int default_phys_pkg_id(int cpuid_apic, int index_msb) |
69 | { | 68 | { |
70 | return cpuid_apic >> index_msb; | 69 | return cpuid_apic >> index_msb; |
71 | } | 70 | } |
diff --git a/arch/x86/include/asm/mach-generic/mach_apic.h b/arch/x86/include/asm/mach-generic/mach_apic.h index 6fed521585c4..1eeb5b61e488 100644 --- a/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/arch/x86/include/asm/mach-generic/mach_apic.h | |||
@@ -5,7 +5,6 @@ | |||
5 | 5 | ||
6 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) | 6 | #define cpu_mask_to_apicid (apic->cpu_mask_to_apicid) |
7 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) | 7 | #define cpu_mask_to_apicid_and (apic->cpu_mask_to_apicid_and) |
8 | #define phys_pkg_id (apic->phys_pkg_id) | ||
9 | #define wakeup_secondary_cpu (apic->wakeup_cpu) | 8 | #define wakeup_secondary_cpu (apic->wakeup_cpu) |
10 | 9 | ||
11 | extern void generic_bigsmp_probe(void); | 10 | extern void generic_bigsmp_probe(void); |
diff --git a/arch/x86/include/asm/numaq/apic.h b/arch/x86/include/asm/numaq/apic.h index bc2c8a425c03..765c4d5124cb 100644 --- a/arch/x86/include/asm/numaq/apic.h +++ b/arch/x86/include/asm/numaq/apic.h | |||
@@ -113,7 +113,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, | |||
113 | } | 113 | } |
114 | 114 | ||
115 | /* No NUMA-Q box has a HT CPU, but it can't hurt to use the default code. */ | 115 | /* No NUMA-Q box has a HT CPU, but it can't hurt to use the default code. */ |
116 | static inline int phys_pkg_id(int cpuid_apic, int index_msb) | 116 | static inline int numaq_phys_pkg_id(int cpuid_apic, int index_msb) |
117 | { | 117 | { |
118 | return cpuid_apic >> index_msb; | 118 | return cpuid_apic >> index_msb; |
119 | } | 119 | } |
diff --git a/arch/x86/include/asm/summit/apic.h b/arch/x86/include/asm/summit/apic.h index 64cd441ae006..fa6b3b45290d 100644 --- a/arch/x86/include/asm/summit/apic.h +++ b/arch/x86/include/asm/summit/apic.h | |||
@@ -182,7 +182,7 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *inmask, | |||
182 | * | 182 | * |
183 | * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID. | 183 | * See Intel's IA-32 SW Dev's Manual Vol2 under CPUID. |
184 | */ | 184 | */ |
185 | static inline int phys_pkg_id(int cpuid_apic, int index_msb) | 185 | static inline int summit_phys_pkg_id(int cpuid_apic, int index_msb) |
186 | { | 186 | { |
187 | return hard_smp_processor_id() >> index_msb; | 187 | return hard_smp_processor_id() >> index_msb; |
188 | } | 188 | } |