[RFC patch] reset TSC at the begining of check_tsc_warp

From: Luming Yu
Date: Mon Jun 01 2009 - 05:02:54 EST


Hello,

Without this patch, we always get kernel warning that TSC warp between CPUs,
and TSC is marked unstable due to check_tsc_sync_source failed if the CPUs
have the problem of not-synced initial TSC.

It hurts CPUs with constant-tsc feature, but with unsynced initial TSC value...

The downside is we could break perfect synced TSC with this patch.
Please review, test and apply.

**The patch is enclosed in text attachment*
**Using web client to send the patch* *
**below is c&p just for review, please apply attached patch*/

Thanks,
Luming



Signed-off-by: Yu Luming <luming.yu@xxxxxxxxx>

tsc_sync.c | 1 +
1 file changed, 1 insertion(+)


diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c
index bf36328..190c1b0 100644
--- a/arch/x86/kernel/tsc_sync.c
+++ b/arch/x86/kernel/tsc_sync.c
@@ -46,6 +46,7 @@ static __cpuinit void check_tsc_warp(void)
cycles_t start, now, prev, end;
int i;

+ wrmsrl(MSR_IA32_TSC, 0);
rdtsc_barrier();
start = get_cycles();
rdtsc_barrier();

Attachment: 2.patch
Description: Binary data