]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Revert "xen/cpu: Make VCPU hotplug code online CPUs properly."
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 7 May 2012 20:43:32 +0000 (16:43 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Mon, 7 May 2012 20:43:32 +0000 (16:43 -0400)
This reverts commit d1038b12072b0925db1deb973ce3b06e0a718143.

[this should be fixed in drivers/cpu.c to export online
SysFS attribute properly then try to race with udev]

drivers/xen/cpu_hotplug.c

index df80af818d5f772bdd4498ace052d59541222663..4dcfced107f50e41c518405b28747064d62d78bc 100644 (file)
@@ -8,20 +8,18 @@
 
 static void enable_hotplug_cpu(int cpu)
 {
-       if (!cpu_present(cpu)) {
+       if (!cpu_present(cpu))
                arch_register_cpu(cpu);
-               set_cpu_present(cpu, true);
-               (void)cpu_up(cpu);
-       }
+
+       set_cpu_present(cpu, true);
 }
 
 static void disable_hotplug_cpu(int cpu)
 {
-       if (cpu_present(cpu)) {
-               (void)cpu_down(cpu);
-               set_cpu_present(cpu, false);
+       if (cpu_present(cpu))
                arch_unregister_cpu(cpu);
-       }
+
+       set_cpu_present(cpu, false);
 }
 
 static int vcpu_online(unsigned int cpu)
@@ -55,6 +53,7 @@ static void vcpu_hotplug(unsigned int cpu)
                enable_hotplug_cpu(cpu);
                break;
        case 0:
+               (void)cpu_down(cpu);
                disable_hotplug_cpu(cpu);
                break;
        default: