diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c index 43de1f51b53f50863c05b79e235d24233aaa33ad..5676aefdf2bca72bd8734ff2642c3720b480d43a 100644 --- a/drivers/xen/cpu_hotplug.c +++ b/drivers/xen/cpu_hotplug.c @@ -18,6 +18,11 @@ static void enable_hotplug_cpu(int cpu) static void disable_hotplug_cpu(int cpu) { + if (cpu_online(cpu)) { + lock_device_hotplug(); + device_offline(get_cpu_device(cpu)); + unlock_device_hotplug(); + } if (cpu_present(cpu)) xen_arch_unregister_cpu(cpu); @@ -55,7 +60,6 @@ static void vcpu_hotplug(unsigned int cpu) enable_hotplug_cpu(cpu); break; case 0: - (void)cpu_down(cpu); disable_hotplug_cpu(cpu); break; default: