x86: enable interrupts explicitly in __start_xen()
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 11 Dec 2008 13:25:28 +0000 (13:25 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 11 Dec 2008 13:25:28 +0000 (13:25 +0000)
Instead of relying on smp_prepare_cpus() (via check_nmi_watchdog()) or
init_xen_time() (via init_platform_timer() -> plt_overflow())
implicitly enabling interrupts, enable them explicitly once safe to do
so (it may actually be possible to move this even further up, but I
don't think that would buy us much).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Also move spin_debug_enable() a bit higer. Moving it above
smp_prepare_cpus() didn't work for some reason though!

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/setup.c

index 833f22e5ba3b2a692ba460f112347db0b48868c8..c8639d35f3c5316292f3a7c916da7a4d609b92a2 100644 (file)
@@ -941,6 +941,9 @@ void __init __start_xen(unsigned long mbi_p)
         set_in_cr4(X86_CR4_OSFXSR);
     if ( cpu_has_xmm )
         set_in_cr4(X86_CR4_OSXMMEXCPT);
+
+    local_irq_enable();
+
 #ifdef CONFIG_X86_64
     vesa_mtrr_init();
 #endif
@@ -950,6 +953,8 @@ void __init __start_xen(unsigned long mbi_p)
 
     smp_prepare_cpus(max_cpus);
 
+    spin_debug_enable();
+
     /*
      * Initialise higher-level timer functions. We do this fairly late
      * (post-SMP) because the time bases and scale factors need to be updated 
@@ -962,9 +967,6 @@ void __init __start_xen(unsigned long mbi_p)
 
     serial_init_postirq();
 
-    BUG_ON(!local_irq_is_enabled());
-    spin_debug_enable();
-
     for_each_present_cpu ( i )
     {
         if ( num_online_cpus() >= max_cpus )