Skip to content

Commit 1daf08a

Browse files
Sebastian Andrzej SiewiorJiri Kosina
authored andcommitted
livepatch: 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. Cc: Josh Poimboeuf <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Miroslav Benes <[email protected]> Cc: Petr Mladek <[email protected]> Cc: Joe Lawrence <[email protected]> Cc: [email protected] Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent eb6bbac commit 1daf08a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/livepatch/transition.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ void klp_try_complete_transition(void)
411411
/*
412412
* Ditto for the idle "swapper" tasks.
413413
*/
414-
get_online_cpus();
414+
cpus_read_lock();
415415
for_each_possible_cpu(cpu) {
416416
task = idle_task(cpu);
417417
if (cpu_online(cpu)) {
@@ -423,7 +423,7 @@ void klp_try_complete_transition(void)
423423
task->patch_state = klp_target_state;
424424
}
425425
}
426-
put_online_cpus();
426+
cpus_read_unlock();
427427

428428
if (!complete) {
429429
if (klp_signals_cnt && !(klp_signals_cnt % SIGNALS_TIMEOUT))

0 commit comments

Comments
 (0)