kolasa_4.0-cr4-strn.patch 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. diff -uNr 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c 14.12_2/common/lib/modules/fglrx/build_mod/firegl_public.c
  2. --- 14.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-11-28 21:02:10.000000000 +0100
  3. +++ 14.12_2/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-03-08 13:30:42.565275902 +0100
  4. @@ -4468,8 +4468,13 @@
  5. if (cpu_has_pge)
  6. {
  7. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
  8. cr4 = read_cr4();
  9. write_cr4(cr4 & ~X86_CR4_PGE);
  10. +#else
  11. + cr4 = __read_cr4();
  12. + __write_cr4(cr4 & ~X86_CR4_PGE);
  13. +#endif
  14. }
  15. __flush_tlb();
  16. @@ -4482,7 +4487,11 @@
  17. write_cr0(cr0 & 0xbfffffff);
  18. if (cpu_has_pge)
  19. {
  20. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
  21. write_cr4(cr4);
  22. +#else
  23. + __write_cr4(cr4);
  24. +#endif
  25. }
  26. local_irq_restore(flags);
  27. @@ -4509,8 +4518,13 @@
  28. if (cpu_has_pge)
  29. {
  30. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
  31. cr4 = read_cr4();
  32. write_cr4(cr4 & ~X86_CR4_PGE);
  33. +#else
  34. + cr4 = __read_cr4();
  35. + __write_cr4(cr4 & ~X86_CR4_PGE);
  36. +#endif
  37. }
  38. __flush_tlb();
  39. @@ -4522,7 +4536,11 @@
  40. write_cr0(cr0 & 0xbfffffff);
  41. if (cpu_has_pge)
  42. {
  43. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
  44. write_cr4(cr4);
  45. +#else
  46. + __write_cr4(cr4);
  47. +#endif
  48. }
  49. local_irq_restore(flags);
  50. diff -uNr 14.12/common/lib/modules/fglrx/build_mod/kcl_str.c 14.12_2/common/lib/modules/fglrx/build_mod/kcl_str.c
  51. --- 14.12/common/lib/modules/fglrx/build_mod/kcl_str.c 2014-11-28 21:02:10.000000000 +0100
  52. +++ 14.12_2/common/lib/modules/fglrx/build_mod/kcl_str.c 2015-03-08 13:25:11.568396701 +0100
  53. @@ -169,7 +169,11 @@
  54. const char* s2,
  55. KCL_TYPE_SizeSigned count)
  56. {
  57. +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,0,0)
  58. return strnicmp(s1, s2, count);
  59. +#else
  60. + return strncasecmp(s1, s2, count);
  61. +#endif
  62. }
  63. /** \brief Locate character in string