From 7b038a3bf50a2811dd150d5c4b188fbc3387b39c Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 26 Apr 2011 14:15:15 +0100 Subject: x86: No need for disable_tsc_sync when full 64-bit TSC cannot be written During boot we only write zero to the TSCs, which is safe. Signed-off-by: Keir Fraser --- xen/arch/x86/smpboot.c | 12 ------------ xen/arch/x86/time.c | 3 --- xen/include/asm-x86/time.h | 2 -- 3 files changed, 17 deletions(-) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 35f3c153b7..b0b9f52d65 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -172,12 +172,6 @@ valid_k7: * then we print a warning if not, and always resync. */ -/* - * TSC's upper 32 bits can't be written in earlier CPUs (before - * Prescott), there is no way to resync one AP against BP. - */ -bool_t disable_tsc_sync; - static atomic_t tsc_start_flag = ATOMIC_INIT(0); static atomic_t tsc_count_start = ATOMIC_INIT(0); static atomic_t tsc_count_stop = ATOMIC_INIT(0); @@ -194,9 +188,6 @@ static void __init synchronize_tsc_bp (void) unsigned int one_usec; int buggy = 0; - if ( disable_tsc_sync ) - return; - if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) { printk("TSC is reliable, synchronization unnecessary\n"); return; @@ -294,9 +285,6 @@ static void __init synchronize_tsc_ap (void) { int i; - if ( disable_tsc_sync ) - return; - if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) return; diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 6451dd3f8b..c08f815b17 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1473,9 +1473,6 @@ static void __init tsc_check_writability(void) /* cstate_restore_tsc() must not be used (or do nothing) */ if ( !boot_cpu_has(X86_FEATURE_NONSTOP_TSC) ) cpuidle_disable_deep_cstate(); - - /* synchronize_tsc_slave() must do nothing */ - disable_tsc_sync = 1; } /* Late init function (after all CPUs are booted). */ diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h index 6e9410aedd..724fc4a93c 100644 --- a/xen/include/asm-x86/time.h +++ b/xen/include/asm-x86/time.h @@ -27,8 +27,6 @@ void calibrate_tsc_ap(void); typedef u64 cycles_t; -extern bool_t disable_tsc_sync; - static inline cycles_t get_cycles(void) { cycles_t c; -- cgit v1.2.3