summaryrefslogtreecommitdiffstats
path: root/kernel/perf_event.c
diff options
context:
space:
mode:
authorRusty Russell2009-12-17 18:43:08 +0100
committerRusty Russell2009-12-17 02:13:11 +0100
commitf6325e30ebd6fc870315b017a5d4a6ab15bf790b (patch)
treefd5961e95c8aeef5b4f4517c81bedbf4a774cece /kernel/perf_event.c
parentMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs (diff)
downloadkernel-qcow2-linux-f6325e30ebd6fc870315b017a5d4a6ab15bf790b.tar.gz
kernel-qcow2-linux-f6325e30ebd6fc870315b017a5d4a6ab15bf790b.tar.xz
kernel-qcow2-linux-f6325e30ebd6fc870315b017a5d4a6ab15bf790b.zip
cpumask: use cpu_online in kernel/perf_event.c
Also, we want to check against nr_cpu_ids, not num_possible_cpus(). The latter works, but the correct bounds check is < nr_cpu_ids. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> To: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/perf_event.c')
-rw-r--r--kernel/perf_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index 8ab86988bd24..97d1a3dd7a59 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -1614,7 +1614,7 @@ static struct perf_event_context *find_get_context(pid_t pid, int cpu)
* offline CPU and activate it when the CPU comes up, but
* that's for later.
*/
- if (!cpu_isset(cpu, cpu_online_map))
+ if (!cpu_online(cpu))
return ERR_PTR(-ENODEV);
cpuctx = &per_cpu(perf_cpu_context, cpu);