|
@@ -823,12 +823,8 @@ static int cpumsf_pmu_event_init(struct perf_event *event)
|
|
}
|
|
}
|
|
|
|
|
|
/* Check online status of the CPU to which the event is pinned */
|
|
/* Check online status of the CPU to which the event is pinned */
|
|
- if (event->cpu >= 0) {
|
|
|
|
- if ((unsigned int)event->cpu >= nr_cpumask_bits)
|
|
|
|
|
|
+ if (event->cpu >= 0 && !cpu_online(event->cpu))
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
- if (!cpu_online(event->cpu))
|
|
|
|
- return -ENODEV;
|
|
|
|
- }
|
|
|
|
|
|
|
|
/* Force reset of idle/hv excludes regardless of what the
|
|
/* Force reset of idle/hv excludes regardless of what the
|
|
* user requested.
|
|
* user requested.
|