From: Jan Beulich Date: Tue, 27 Mar 2012 13:22:54 +0000 (+0200) Subject: x86/hpet: replace disabling of legacy broadcast X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=eca1bfec46214a902f24bce2b44c96ae364f1219;p=xen.git x86/hpet: replace disabling of legacy broadcast ... 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 Acked-by: Keir Fraser --- diff --git a/xen/arch/x86/crash.c b/xen/arch/x86/crash.c index 0e1afa67dd..88cba19a40 100644 --- a/xen/arch/x86/crash.c +++ b/xen/arch/x86/crash.c @@ -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; diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index b5ef54f90a..71f0b815f4 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -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); diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c index fbab8d0340..5eb322128f 100644 --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -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(); }