]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/xen/smp_pv: Remove wait for CPU online
authorThomas Gleixner <tglx@linutronix.de>
Wed, 29 Mar 2023 14:11:28 +0000 (16:11 +0200)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 30 Mar 2023 12:27:06 +0000 (14:27 +0200)
Now that the core code drops sparse_irq_lock after the idle thread
synchronized, it's pointless to wait for the AP to mark itself online.

Whether the control CPU runs in a wait loop or sleeps in the core code
waiting for the online operation to complete makes no difference.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/xen/smp_pv.c

index a6f9128a40912350d87df1714ef49d02f23c1576..be40927667cf2dcecb18006a76bac9d108d88d4a 100644 (file)
@@ -340,11 +340,11 @@ static int xen_pv_cpu_up(unsigned int cpu, struct task_struct *idle)
 
        xen_pmu_init(cpu);
 
-       rc = HYPERVISOR_vcpu_op(VCPUOP_up, xen_vcpu_nr(cpu), NULL);
-       BUG_ON(rc);
-
-       while (cpu_report_state(cpu) != CPU_ONLINE)
-               HYPERVISOR_sched_op(SCHEDOP_yield, NULL);
+       /*
+        * Why is this a BUG? If the hypercall fails then everything can be
+        * rolled back, no?
+        */
+       BUG_ON(HYPERVISOR_vcpu_op(VCPUOP_up, xen_vcpu_nr(cpu), NULL));
 
        return 0;
 }