Skip to content

Commit a926f81

Browse files
Qais YousefKAGA-KOKO
authored andcommitted
xen/cpuhotplug: Replace cpu_up/down() with device_online/offline()
The core device API performs extra housekeeping bits that are missing from directly calling cpu_up/down(). See commit a6717c0 ("powerpc/rtas: use device model APIs and serialization during LPM") for an example description of what might go wrong. This also prepares to make cpu_up/down() a private interface of the cpu subsystem. Signed-off-by: Qais Yousef <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 02addae commit a926f81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/cpu_hotplug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static int setup_cpu_watcher(struct notifier_block *notifier,
9494

9595
for_each_possible_cpu(cpu) {
9696
if (vcpu_online(cpu) == 0) {
97-
(void)cpu_down(cpu);
97+
device_offline(get_cpu_device(cpu));
9898
set_cpu_present(cpu, false);
9999
}
100100
}

0 commit comments

Comments
 (0)