Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 53935
b: refs/heads/master
c: c5bcb56
h: refs/heads/master
i:
  53933: 032357b
  53931: 0fd0401
  53927: 8c9a1e0
  53919: b6b981b
v: v3
  • Loading branch information
Andi Kleen authored and Andi Kleen committed May 2, 2007
1 parent cab01a3 commit 4cd1de2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bccb23dc5fc2d268ab676e2d4212d29e230fd86
refs/heads/master: c5bcb5635a03da3158f121ae20ccbbf72b4fc62a
9 changes: 9 additions & 0 deletions trunk/include/asm-i386/tsc.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ static __always_inline cycles_t get_cycles_sync(void)
unsigned long long ret;
unsigned eax;

/*
* Use RDTSCP if possible; it is guaranteed to be synchronous
* and doesn't cause a VMEXIT on Hypervisors
*/
alternative_io(ASM_NOP3, ".byte 0x0f,0x01,0xf9", X86_FEATURE_RDTSCP,
"=A" (ret), "0" (0ULL) : "ecx", "memory");
if (ret)
return ret;

/*
* Don't do an additional sync on CPUs where we know
* RDTSC is already synchronous:
Expand Down

0 comments on commit 4cd1de2

Please sign in to comment.