diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-15 23:42:42 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-15 23:42:42 -0400 |
commit | 5dd3c9949a3e92ea7fd8c75d888031f7aff1f1d0 (patch) | |
tree | 18e60117e1e547fe1e973e67a43754a3d8538104 /arch/ia64/kernel/acpi.c | |
parent | 40fe697a1759b85f5e06c490599f4f7b03de3be7 (diff) |
cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits.: ia64
Impact: cleanup, futureproof
In fact, all cpumask ops will only be valid (in general) for bit
numbers < nr_cpu_ids. So use that instead of NR_CPUS in various
places.
This is always safe: no cpu number can be >= nr_cpu_ids, and
nr_cpu_ids is initialized to NR_CPUS at boot.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/ia64/kernel/acpi.c')
-rw-r--r-- | arch/ia64/kernel/acpi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index d541671caf4a..c4f41aca107f 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -924,9 +924,9 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
924 | buffer.length = ACPI_ALLOCATE_BUFFER; | 924 | buffer.length = ACPI_ALLOCATE_BUFFER; |
925 | buffer.pointer = NULL; | 925 | buffer.pointer = NULL; |
926 | 926 | ||
927 | cpus_complement(tmp_map, cpu_present_map); | 927 | cpumask_complement(&tmp_map, cpu_present_mask); |
928 | cpu = first_cpu(tmp_map); | 928 | cpu = cpumask_first(&tmp_map); |
929 | if (cpu >= NR_CPUS) | 929 | if (cpu >= nr_cpu_ids) |
930 | return -EINVAL; | 930 | return -EINVAL; |
931 | 931 | ||
932 | acpi_map_cpu2node(handle, cpu, physid); | 932 | acpi_map_cpu2node(handle, cpu, physid); |