From: Siddha, Suresh B Date: Tue, 11 Apr 2006 10:54:42 +0000 (+0200) Subject: [PATCH] x86_64: fix sync before RDTSC on Intel cpus X-Git-Tag: v2.6.17-rc2~104 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4cff6ac78e9c3bbb90c0e01b20418eeae0c6b52;p=linux-2.6 [PATCH] x86_64: fix sync before RDTSC on Intel cpus Commit c818a18146997d1356a4840b0c01f1168c16c8a4 didn't do the expected thing. This fix will remove the additional sync(cpuid) before RDTSC on Intel platforms.. Signed-off-by: Suresh Siddha Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/include/asm-x86_64/timex.h b/include/asm-x86_64/timex.h index f18443fcdf..b9e5320b76 100644 --- a/include/asm-x86_64/timex.h +++ b/include/asm-x86_64/timex.h @@ -33,7 +33,7 @@ static __always_inline cycles_t get_cycles_sync(void) unsigned eax; /* Don't do an additional sync on CPUs where we know RDTSC is already synchronous. */ - alternative_io(ASM_NOP2, "cpuid", X86_FEATURE_SYNC_RDTSC, + alternative_io("cpuid", ASM_NOP2, X86_FEATURE_SYNC_RDTSC, "=a" (eax), "0" (1) : "ebx","ecx","edx","memory"); rdtscll(ret); return ret;