Skip to content

Commit ffec09f

Browse files
Sebastian Andrzej SiewiorIngo Molnar
authored andcommitted
perf/hw_breakpoint: Replace deprecated CPU-hotplug functions
The functions get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_read_lock() and cpus_read_unlock(). Replace deprecated CPU-hotplug functions with the official version. The behavior remains unchanged. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent eda8a2c commit ffec09f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/events/hw_breakpoint.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ register_wide_hw_breakpoint(struct perf_event_attr *attr,
568568
if (!cpu_events)
569569
return (void __percpu __force *)ERR_PTR(-ENOMEM);
570570

571-
get_online_cpus();
571+
cpus_read_lock();
572572
for_each_online_cpu(cpu) {
573573
bp = perf_event_create_kernel_counter(attr, cpu, NULL,
574574
triggered, context);
@@ -579,7 +579,7 @@ register_wide_hw_breakpoint(struct perf_event_attr *attr,
579579

580580
per_cpu(*cpu_events, cpu) = bp;
581581
}
582-
put_online_cpus();
582+
cpus_read_unlock();
583583

584584
if (likely(!err))
585585
return cpu_events;

0 commit comments

Comments
 (0)