1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
From: Eduard Bloch <blade@debian.org>
Date: Fri, 25 Dec 2015 18:24:18 +0100
Subject: rdtscl
Origin: https://bugs.debian.org/808954
Since Linux 4.3, rdtscl() is no longer available and native_read_tsc()
is renamed to rdtsc(). Move the macro contents in-line and call the
new function. References:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
---
amd64/src/shared/linux_osl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/amd64/src/shared/linux_osl.c b/amd64/src/shared/linux_osl.c
index 6157d18..9adc392 100644
--- a/amd64/src/shared/linux_osl.c
+++ b/amd64/src/shared/linux_osl.c
@@ -932,7 +932,11 @@ osl_getcycles(void)
uint cycles;
#if defined(__i386__)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
+ cycles = (u32)rdtsc();
+#else
rdtscl(cycles);
+#endif
#else
cycles = 0;
#endif
|