diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-16 14:12:42 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-16 14:12:42 +1030 |
commit | 5dd3c9949a3e92ea7fd8c75d888031f7aff1f1d0 (patch) | |
tree | 18e60117e1e547fe1e973e67a43754a3d8538104 /arch/ia64/sn/kernel/sn2/sn_hwperf.c | |
parent | 40fe697a1759b85f5e06c490599f4f7b03de3be7 (diff) | |
download | blackbird-obmc-linux-5dd3c9949a3e92ea7fd8c75d888031f7aff1f1d0.tar.gz blackbird-obmc-linux-5dd3c9949a3e92ea7fd8c75d888031f7aff1f1d0.zip |
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/sn/kernel/sn2/sn_hwperf.c')
-rw-r--r-- | arch/ia64/sn/kernel/sn2/sn_hwperf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/ia64/sn/kernel/sn2/sn_hwperf.c b/arch/ia64/sn/kernel/sn2/sn_hwperf.c index be339477f906..45f3c2390428 100644 --- a/arch/ia64/sn/kernel/sn2/sn_hwperf.c +++ b/arch/ia64/sn/kernel/sn2/sn_hwperf.c @@ -612,7 +612,7 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info) op_info->a->arg &= SN_HWPERF_ARG_OBJID_MASK; if (cpu != SN_HWPERF_ARG_ANY_CPU) { - if (cpu >= NR_CPUS || !cpu_online(cpu)) { + if (cpu >= nr_cpu_ids || !cpu_online(cpu)) { r = -EINVAL; goto out; } |