From: Rusty Russell Date: Thu, 17 Dec 2009 17:43:08 +0000 (-0600) Subject: cpumask: use cpu_online in kernel/perf_event.c X-Git-Tag: v2.6.33-rc1~1^2~6 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Flinux-2.6;a=commitdiff_plain;h=f6325e30ebd6fc870315b017a5d4a6ab15bf790b 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 To: Thomas Gleixner --- diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 8ab8698..97d1a3d 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);