Srivatsa S. Bhat
2012-Jun-01 09:11 UTC
[PATCH 06/27] xen, smpboot: Use generic SMP booting infrastructure
Convert xen to use the generic framework to boot secondary CPUs. Cc: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com> Cc: Jeremy Fitzhardinge <jeremy at goop.org> Cc: Thomas Gleixner <tglx at linutronix.de> Cc: Ingo Molnar <mingo at redhat.com> Cc: "H. Peter Anvin" <hpa at zytor.com> Cc: x86 at kernel.org Cc: xen-devel at lists.xensource.com Cc: virtualization at lists.linux-foundation.org Cc: linux-kernel at vger.kernel.org Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat at linux.vnet.ibm.com> --- arch/x86/xen/smp.c | 21 ++++----------------- 1 files changed, 4 insertions(+), 17 deletions(-) diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 602d6b7..46c96f9 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c @@ -58,13 +58,12 @@ static irqreturn_t xen_reschedule_interrupt(int irq, void *dev_id) return IRQ_HANDLED; } -static void __cpuinit cpu_bringup(void) +void __cpuinit xen_cpu_pre_starting(void *unused) { int cpu; cpu_init(); touch_softlockup_watchdog(); - preempt_disable(); xen_enable_sysenter(); xen_enable_syscall(); @@ -75,25 +74,11 @@ static void __cpuinit cpu_bringup(void) set_cpu_sibling_map(cpu); xen_setup_cpu_clockevents(); - - notify_cpu_starting(cpu); - - set_cpu_online(cpu, true); - - this_cpu_write(cpu_state, CPU_ONLINE); - - wmb(); - - /* We can take interrupts now: we're officially "up". */ - local_irq_enable(); - - wmb(); /* make sure everything is out */ } static void __cpuinit cpu_bringup_and_idle(void) { - cpu_bringup(); - cpu_idle(); + smpboot_start_secondary(NULL); } static int xen_smp_intr_init(unsigned int cpu) @@ -515,6 +500,8 @@ static const struct smp_ops xen_smp_ops __initconst = { .smp_prepare_cpus = xen_smp_prepare_cpus, .smp_cpus_done = xen_smp_cpus_done, + .cpu_pre_starting = xen_cpu_pre_starting, + .cpu_up = xen_cpu_up, .cpu_die = xen_cpu_die, .cpu_disable = xen_cpu_disable,
Apparently Analagous Threads
- [PATCH 06/27] xen, smpboot: Use generic SMP booting infrastructure
- [PATCH 05/27] xen, cpu hotplug: Don't call cpu_bringup() in xen_play_dead()
- [PATCH 05/27] xen, cpu hotplug: Don't call cpu_bringup() in xen_play_dead()
- Xen C6 kernel 4.9.13 and testing 4.9.15 only reboots.
- Xen C6 kernel 4.9.13 and testing 4.9.15 only reboots.