diff options
author | Mike Travis <travis@sgi.com> | 2008-12-16 20:33:55 -0500 |
---|---|---|
committer | Mike Travis <travis@sgi.com> | 2008-12-16 20:40:56 -0500 |
commit | 6eeb7c5a99434596c5953a95baa17d2f085664e3 (patch) | |
tree | 30fd0b08b0a427b953beaf92927468bf86fad956 /arch/x86/kernel/genapic_flat_64.c | |
parent | 95d313cf1c1ecedc8bec5727b09bdacbf67dfc45 (diff) |
x86: update add-cpu_mask_to_apicid_and to use struct cpumask*
Impact: use updated APIs
Various API updates for x86:add-cpu_mask_to_apicid_and
(Note: separate because previous patch has been "backported" to 2.6.27.)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'arch/x86/kernel/genapic_flat_64.c')
-rw-r--r-- | arch/x86/kernel/genapic_flat_64.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/x86/kernel/genapic_flat_64.c b/arch/x86/kernel/genapic_flat_64.c index 1efecd206a74..c772bb10b173 100644 --- a/arch/x86/kernel/genapic_flat_64.c +++ b/arch/x86/kernel/genapic_flat_64.c | |||
@@ -158,13 +158,13 @@ static unsigned int flat_cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
158 | return cpus_addr(*cpumask)[0] & APIC_ALL_CPUS; | 158 | return cpus_addr(*cpumask)[0] & APIC_ALL_CPUS; |
159 | } | 159 | } |
160 | 160 | ||
161 | static unsigned int flat_cpu_mask_to_apicid_and(const cpumask_t *cpumask, | 161 | static unsigned int flat_cpu_mask_to_apicid_and(const struct cpumask *cpumask, |
162 | const cpumask_t *andmask) | 162 | const struct cpumask *andmask) |
163 | { | 163 | { |
164 | unsigned long mask1 = cpus_addr(*cpumask)[0] & APIC_ALL_CPUS; | 164 | unsigned long mask1 = cpumask_bits(cpumask)[0] & APIC_ALL_CPUS; |
165 | unsigned long mask2 = cpus_addr(*andmask)[0] & APIC_ALL_CPUS; | 165 | unsigned long mask2 = cpumask_bits(andmask)[0] & APIC_ALL_CPUS; |
166 | 166 | ||
167 | return (int)(mask1 & mask2); | 167 | return mask1 & mask2; |
168 | } | 168 | } |
169 | 169 | ||
170 | static unsigned int phys_pkg_id(int index_msb) | 170 | static unsigned int phys_pkg_id(int index_msb) |
@@ -264,8 +264,9 @@ static unsigned int physflat_cpu_mask_to_apicid(const cpumask_t *cpumask) | |||
264 | return BAD_APICID; | 264 | return BAD_APICID; |
265 | } | 265 | } |
266 | 266 | ||
267 | static unsigned int physflat_cpu_mask_to_apicid_and(const cpumask_t *cpumask, | 267 | static unsigned int |
268 | const cpumask_t *andmask) | 268 | physflat_cpu_mask_to_apicid_and(const struct cpumask *cpumask, |
269 | const struct cpumask *andmask) | ||
269 | { | 270 | { |
270 | int cpu; | 271 | int cpu; |
271 | 272 | ||
@@ -273,9 +274,9 @@ static unsigned int physflat_cpu_mask_to_apicid_and(const cpumask_t *cpumask, | |||
273 | * We're using fixed IRQ delivery, can only return one phys APIC ID. | 274 | * We're using fixed IRQ delivery, can only return one phys APIC ID. |
274 | * May as well be the first. | 275 | * May as well be the first. |
275 | */ | 276 | */ |
276 | while ((cpu = next_cpu(-1, *cpumask)) < nr_cpu_ids) | 277 | cpu = cpumask_any_and(cpumask, andmask); |
277 | if (cpu_isset(cpu, *andmask)) | 278 | if (cpu < nr_cpu_ids) |
278 | return per_cpu(x86_cpu_to_apicid, cpu); | 279 | return per_cpu(x86_cpu_to_apicid, cpu); |
279 | return BAD_APICID; | 280 | return BAD_APICID; |
280 | } | 281 | } |
281 | 282 | ||