aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/bigsmp
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 09:20:18 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-28 17:20:30 -0500
commitdebccb3e77be52cfc26c5a99e123c114c5c72aeb (patch)
tree27c015b45085b2042737d94a3fbd3c62fe143c37 /arch/x86/include/asm/bigsmp
parent94af18755266edf46803564414d74f9621aaded8 (diff)
x86, apic: refactor ->cpu_mask_to_apicid*()
- spread out the namespace on a per driver basis - clean up the functions - get rid of macros Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/include/asm/bigsmp')
-rw-r--r--arch/x86/include/asm/bigsmp/apic.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/arch/x86/include/asm/bigsmp/apic.h b/arch/x86/include/asm/bigsmp/apic.h
index 1230f5d7a38e..ee29d66cd302 100644
--- a/arch/x86/include/asm/bigsmp/apic.h
+++ b/arch/x86/include/asm/bigsmp/apic.h
@@ -105,18 +105,14 @@ static inline int bigsmp_check_phys_apicid_present(int boot_cpu_physical_apicid)
105} 105}
106 106
107/* As we are using single CPU as destination, pick only one CPU here */ 107/* As we are using single CPU as destination, pick only one CPU here */
108static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask) 108static inline unsigned int bigsmp_cpu_mask_to_apicid(const cpumask_t *cpumask)
109{ 109{
110 int cpu; 110 return bigsmp_cpu_to_logical_apicid(first_cpu(*cpumask));
111 int apicid;
112
113 cpu = first_cpu(*cpumask);
114 apicid = bigsmp_cpu_to_logical_apicid(cpu);
115 return apicid;
116} 111}
117 112
118static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask, 113static inline unsigned int
119 const struct cpumask *andmask) 114bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
115 const struct cpumask *andmask)
120{ 116{
121 int cpu; 117 int cpu;
122 118
@@ -124,9 +120,10 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
124 * We're using fixed IRQ delivery, can only return one phys APIC ID. 120 * We're using fixed IRQ delivery, can only return one phys APIC ID.
125 * May as well be the first. 121 * May as well be the first.
126 */ 122 */
127 for_each_cpu_and(cpu, cpumask, andmask) 123 for_each_cpu_and(cpu, cpumask, andmask) {
128 if (cpumask_test_cpu(cpu, cpu_online_mask)) 124 if (cpumask_test_cpu(cpu, cpu_online_mask))
129 break; 125 break;
126 }
130 if (cpu < nr_cpu_ids) 127 if (cpu < nr_cpu_ids)
131 return bigsmp_cpu_to_logical_apicid(cpu); 128 return bigsmp_cpu_to_logical_apicid(cpu);
132 129