Merge branch 'kvm-updates/3.4' of git://git.kernel.org/pub/scm/virt/kvm/kvm
[linux-3.10.git] / arch / x86 / kernel / smpboot.c
index a05d6fd..5104a2b 100644 (file)
@@ -292,19 +292,6 @@ notrace static void __cpuinit start_secondary(void *unused)
        per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
        x86_platform.nmi_init();
 
-       /*
-        * Wait until the cpu which brought this one up marked it
-        * online before enabling interrupts. If we don't do that then
-        * we can end up waking up the softirq thread before this cpu
-        * reached the active state, which makes the scheduler unhappy
-        * and schedule the softirq thread on the wrong cpu. This is
-        * only observable with forced threaded interrupts, but in
-        * theory it could also happen w/o them. It's just way harder
-        * to achieve.
-        */
-       while (!cpumask_test_cpu(smp_processor_id(), cpu_active_mask))
-               cpu_relax();
-
        /* enable local interrupts */
        local_irq_enable();
 
@@ -741,8 +728,6 @@ do_rest:
         * the targeted processor.
         */
 
-       printk(KERN_DEBUG "smpboot cpu %d: start_ip = %lx\n", cpu, start_ip);
-
        atomic_set(&init_deasserted, 0);
 
        if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
@@ -792,9 +777,10 @@ do_rest:
                        schedule();
                }
 
-               if (cpumask_test_cpu(cpu, cpu_callin_mask))
+               if (cpumask_test_cpu(cpu, cpu_callin_mask)) {
+                       print_cpu_msr(&cpu_data(cpu));
                        pr_debug("CPU%d: has booted.\n", cpu);
-               else {
+               } else {
                        boot_error = 1;
                        if (*(volatile u32 *)TRAMPOLINE_SYM(trampoline_status)
                            == 0xA5A5A5A5)
@@ -848,7 +834,7 @@ int __cpuinit native_cpu_up(unsigned int cpu)
 
        if (apicid == BAD_APICID || apicid == boot_cpu_physical_apicid ||
            !physid_isset(apicid, phys_cpu_present_map) ||
-           (!x2apic_mode && apicid >= 255)) {
+           !apic->apic_id_valid(apicid)) {
                printk(KERN_ERR "%s: bad cpu %d\n", __func__, cpu);
                return -EINVAL;
        }