From d2f5fa9c5505a5c3df8170b498e890f50dfc9553 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 24 Jun 2023 19:27:47 +0100 Subject: gentoo auto-resync : 24:06:2023 - 19:27:47 --- net-wireless/broadcom-sta/files/002-rdtscl.patch | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 net-wireless/broadcom-sta/files/002-rdtscl.patch (limited to 'net-wireless/broadcom-sta/files/002-rdtscl.patch') diff --git a/net-wireless/broadcom-sta/files/002-rdtscl.patch b/net-wireless/broadcom-sta/files/002-rdtscl.patch new file mode 100644 index 000000000000..1b9862cc3d8d --- /dev/null +++ b/net-wireless/broadcom-sta/files/002-rdtscl.patch @@ -0,0 +1,22 @@ +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 + +diff -ru a/src/shared/linux_osl.c b/src/shared/linux_osl.c +--- a/src/shared/linux_osl.c 2015-09-19 01:47:15.000000000 +0300 ++++ b/src/shared/linux_osl.c 2015-11-21 15:20:30.585902518 +0200 +@@ -932,7 +932,11 @@ + 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 -- cgit v1.2.3