mirror of
https://github.com/adulau/aha.git
synced 2024-12-26 18:56:14 +00:00
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>
This commit is contained in:
parent
bea4c899f2
commit
f6325e30eb
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue