]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/xen/cpu_hotplug.c
Merge remote-tracking branch 'xen-tip/linux-next'
[karo-tx-linux.git] / drivers / xen / cpu_hotplug.c
index cc6513a176b0b07ea25990a8470f3d8ee907f507..5676aefdf2bca72bd8734ff2642c3720b480d43a 100644 (file)
 static void enable_hotplug_cpu(int cpu)
 {
        if (!cpu_present(cpu))
-               arch_register_cpu(cpu);
+               xen_arch_register_cpu(cpu);
 
        set_cpu_present(cpu, true);
 }
 
 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))
-               arch_unregister_cpu(cpu);
+               xen_arch_unregister_cpu(cpu);
 
        set_cpu_present(cpu, false);
 }
@@ -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:
@@ -102,7 +106,11 @@ static int __init setup_vcpu_hotplug_event(void)
        static struct notifier_block xsn_cpu = {
                .notifier_call = setup_cpu_watcher };
 
+#ifdef CONFIG_X86
        if (!xen_pv_domain())
+#else
+       if (!xen_domain())
+#endif
                return -ENODEV;
 
        register_xenstore_notifier(&xsn_cpu);