x86/hpet: replace disabling of legacy broadcast
authorJan Beulich <jbeulich@suse.com>
Tue, 27 Mar 2012 13:22:54 +0000 (15:22 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 27 Mar 2012 13:22:54 +0000 (15:22 +0200)
... by the call to hpet_disable() added in the immediately preceding
patch.

In order to retain the behavior intended by c/s 23776:0ddb4481f883,
implement one of the alternative options pointed out there: remove CPUs
from the online map in __stop_this_cpu() (and hence doing so in
stop_this_cpu() is no longer needed).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/crash.c
xen/arch/x86/hpet.c
xen/arch/x86/smp.c

index 0e1afa67dd604779ecfce15d59ce494fc42fb71e..88cba19a40cc5709bfe6f61d0bbd2d1c1be7b72f 100644 (file)
@@ -61,9 +61,6 @@ static void nmi_shootdown_cpus(void)
 
     local_irq_disable();
 
-    if ( hpet_broadcast_is_available() )
-        hpet_disable_legacy_broadcast();
-
     crashing_cpu = smp_processor_id();
     local_irq_count(crashing_cpu) = 0;
 
index b5ef54f90a291870fdc057db15e972a6712fee5e..71f0b815f4996f4cc77087d14bd86b5a4d8da4f4 100644 (file)
@@ -779,7 +779,11 @@ void hpet_disable(void)
     u32 id;
 
     if ( !hpet_boot_cfg )
+    {
+        if ( hpet_broadcast_is_available() )
+            hpet_disable_legacy_broadcast();
         return;
+    }
 
     hpet_write32(*hpet_boot_cfg & ~HPET_CFG_ENABLE, HPET_CFG);
 
index fbab8d0340ef42ea1450f89e695da96ecd311318..5eb322128fd61671741489f6d55ae62525c20951 100644 (file)
@@ -349,12 +349,13 @@ void __stop_this_cpu(void)
      */
     clts();
     asm volatile ( "fninit" );
+
+    cpumask_clear_cpu(smp_processor_id(), &cpu_online_map);
 }
 
 static void stop_this_cpu(void *dummy)
 {
     __stop_this_cpu();
-    cpumask_clear_cpu(smp_processor_id(), &cpu_online_map);
     for ( ; ; )
         halt();
 }