broadcom-wl-6.30.223.271-kernel-4.3-rdtscl-buildfix.patch 985 B

12345678910111213141516171819202122232425262728
  1. Since Linux 4.3, rdtscl() is no longer available and native_read_tsc()
  2. is renamed to rdtsc(). Move the macro contents in-line and call the
  3. new function. References:
  4. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=fe47ae6e1a5005b2e82f7eab57b5c3820453293a
  5. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=4ea1636b04dbd66536fa387bae2eea463efc705b
  6. ---
  7. src/shared/linux_osl.c | 4 ++++
  8. 1 file changed, 4 insertions(+)
  9. diff -Nurp broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c broadcom-wl-6.30.223.271/src/shared/linux_osl.c
  10. --- broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c 2015-09-19 01:47:30.000000000 +0300
  11. +++ broadcom-wl-6.30.223.271/src/shared/linux_osl.c 2020-01-11 01:17:02.688960782 +0200
  12. @@ -932,7 +932,11 @@ osl_getcycles(void)
  13. uint cycles;
  14. #if defined(__i386__)
  15. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
  16. + cycles = (u32)rdtsc();
  17. +#else
  18. rdtscl(cycles);
  19. +#endif
  20. #else
  21. cycles = 0;
  22. #endif