From 47deec46a27938b819de3b466e93b857418ab826 Mon Sep 17 00:00:00 2001 From: Konrad Rzeszutek Wilk Date: Mon, 7 May 2012 16:43:32 -0400 Subject: [PATCH] Revert "xen/cpu: Make VCPU hotplug code online CPUs properly." 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 | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/xen/cpu_hotplug.c b/drivers/xen/cpu_hotplug.c index df80af818d5f..4dcfced107f5 100644 --- a/drivers/xen/cpu_hotplug.c +++ b/drivers/xen/cpu_hotplug.c @@ -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: -- 2.39.5