Commit e4cff6ac authored by Siddha, Suresh B's avatar Siddha, Suresh B Committed by Linus Torvalds

[PATCH] x86_64: fix sync before RDTSC on Intel cpus

Commit c818a181 didn't do the expected
thing.  This fix will remove the additional sync(cpuid) before RDTSC on
Intel platforms..
Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 97a4d003
...@@ -33,7 +33,7 @@ static __always_inline cycles_t get_cycles_sync(void) ...@@ -33,7 +33,7 @@ static __always_inline cycles_t get_cycles_sync(void)
unsigned eax; unsigned eax;
/* Don't do an additional sync on CPUs where we know /* Don't do an additional sync on CPUs where we know
RDTSC is already synchronous. */ 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"); "=a" (eax), "0" (1) : "ebx","ecx","edx","memory");
rdtscll(ret); rdtscll(ret);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment