Skip to content

Commit

Permalink
cpumask: use cpu_online in kernel/perf_event.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rusty Russell committed Dec 17, 2009
1 parent bea4c89 commit f6325e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f6325e3

Please sign in to comment.