aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/bigsmp/apic.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-28 15:20:18 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-28 23:20:30 +0100
commitdebccb3e77be52cfc26c5a99e123c114c5c72aeb (patch)
tree27c015b45085b2042737d94a3fbd3c62fe143c37 /arch/x86/include/asm/bigsmp/apic.h
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/apic.h')
-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 1230f5d7a38..ee29d66cd30 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)
}
/* As we are using single CPU as destination, pick only one CPU here */
-static inline unsigned int cpu_mask_to_apicid(const cpumask_t *cpumask)
+static inline unsigned int bigsmp_cpu_mask_to_apicid(const cpumask_t *cpumask)
{
- int cpu;
- int apicid;
-
- cpu = first_cpu(*cpumask);
- apicid = bigsmp_cpu_to_logical_apicid(cpu);
- return apicid;
+ return bigsmp_cpu_to_logical_apicid(first_cpu(*cpumask));
}
-static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
- const struct cpumask *andmask)
+static inline unsigned int
+bigsmp_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
+ const struct cpumask *andmask)
{
int cpu;
@@ -124,9 +120,10 @@ static inline unsigned int cpu_mask_to_apicid_and(const struct cpumask *cpumask,
* We're using fixed IRQ delivery, can only return one phys APIC ID.
* May as well be the first.
*/
- for_each_cpu_and(cpu, cpumask, andmask)
+ for_each_cpu_and(cpu, cpumask, andmask) {
if (cpumask_test_cpu(cpu, cpu_online_mask))
break;
+ }
if (cpu < nr_cpu_ids)
return bigsmp_cpu_to_logical_apicid(cpu);