diff mbox

[06/12] Add compat version of native_read_tsc

Message ID 20091019105924.3988.63450.stgit@mchn012c.ww002.siemens.net (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Kiszka Oct. 19, 2009, 10:59 a.m. UTC
None
diff mbox

Patch

diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
index 2545ce9..a1a21a5 100644
--- a/x86/external-module-compat.h
+++ b/x86/external-module-compat.h
@@ -90,6 +90,13 @@  static inline unsigned long long native_read_msr_safe(unsigned int msr,
 	return EAX_EDX_VAL(val, low, high);
 }
 
+static inline unsigned long long native_read_tsc(void)
+{
+	unsigned long long val;
+	asm volatile("rdtsc" : "=A" (val));
+	return val;
+}
+
 #endif
 
 #endif