Advertisement
Guest User

aur-catalyst-test-linux-5.0.patch

a guest
Mar 12th, 2019
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 4.70 KB | None | 0 0
  1. diff --git a/src/archive_files/common/lib/modules/fglrx/build_mod/2.6.x/Makefile b/src/archive_files/common/lib/modules/fglrx/build_mod/2.6.x/Makefile
  2. index c88f8cd..4ffaf12 100755
  3. --- a/src/archive_files/common/lib/modules/fglrx/build_mod/2.6.x/Makefile
  4. +++ b/src/archive_files/common/lib/modules/fglrx/build_mod/2.6.x/Makefile
  5. @@ -87,7 +87,7 @@ fglrx-cfiles    = ${fglrx-c-objs:.o=.c}
  6.  # default:: kmod_build
  7.  
  8.  kmod_build:: $(fglrx-libs) $(fglrx-cfiles) $(fglrx-hdrs) $(drm-hdrs)
  9. -   $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
  10. +   $(MAKE) -C $(KDIR) M=$(PWD) modules
  11.  
  12.  %.c:
  13.     @ln -s ../$@
  14. diff --git a/src/archive_files/common/lib/modules/fglrx/build_mod/drmP.h b/src/archive_files/common/lib/modules/fglrx/build_mod/drmP.h
  15. index 81546b2..a690ad8 100755
  16. --- a/src/archive_files/common/lib/modules/fglrx/build_mod/drmP.h
  17. +++ b/src/archive_files/common/lib/modules/fglrx/build_mod/drmP.h
  18. @@ -218,12 +218,10 @@
  19.  #define DRM_PROC_LIMIT (PAGE_SIZE-80)
  20.  
  21.  #define DRM_PROC_PRINT(fmt, arg...)                    \
  22. -   len += sprintf(&buf[len], fmt , ##arg);             \
  23. -   if (len > DRM_PROC_LIMIT) { *eof = 1; return len - offset; }
  24. +   if ((len += sprintf(&buf[len], fmt , ##arg)) > DRM_PROC_LIMIT) { *eof = 1; return len - offset; }
  25.  
  26.  #define DRM_PROC_PRINT_RET(ret, fmt, arg...)               \
  27. -   len += sprintf(&buf[len], fmt , ##arg);             \
  28. -   if (len > DRM_PROC_LIMIT) { ret; *eof = 1; return len - offset; }
  29. +   if ((len += sprintf(&buf[len], fmt , ##arg)) > DRM_PROC_LIMIT) { ret; *eof = 1; return len - offset; }
  30.  
  31.  /*@}*/
  32.  
  33. diff --git a/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c b/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
  34. index 64a3faf..25fcb12 100755
  35. --- a/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
  36. +++ b/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
  37. @@ -2741,12 +2741,12 @@ void ATI_API_CALL KCL_UnlockMemPage(void* pt)
  38.  
  39.  int ATI_API_CALL KCL_MEM_VerifyReadAccess(void* addr, kcl_size_t size)
  40.  {
  41. -    return access_ok(VERIFY_READ, addr, size) ? 0 : -EFAULT;
  42. +    return access_ok(addr, size) ? 0 : -EFAULT;
  43.  }
  44.  
  45.  int ATI_API_CALL KCL_MEM_VerifyWriteAccess(void* addr, kcl_size_t size)
  46.  {
  47. -    return access_ok(VERIFY_WRITE, addr, size) ? 0 : -EFAULT;
  48. +    return access_ok(addr, size) ? 0 : -EFAULT;
  49.  }
  50.  
  51.  /** \brief Get Init kernel PTE by address. Couldn't be used for kernel >= 2.6.25.
  52. @@ -6602,6 +6602,7 @@ void ATI_API_CALL KCL_create_uuid(void *buf)
  53.      generate_random_uuid((char *)buf);
  54.  }
  55.  
  56. +#ifndef CONFIG_X86_64
  57.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
  58.  static int KCL_fpu_save_init(struct task_struct *tsk)
  59.  {
  60. @@ -6658,6 +6659,8 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
  61.     return 1;
  62.  }
  63.  #endif
  64. +#endif
  65. +
  66.  
  67.  /** \brief Prepare for using FPU
  68.   *  \param none
  69. @@ -6666,12 +6669,7 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
  70.  void ATI_API_CALL KCL_fpu_begin(void)
  71.  {
  72.  #ifdef CONFIG_X86_64
  73. -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
  74.      kernel_fpu_begin();
  75. -#else
  76. -    preempt_disable();
  77. -    __kernel_fpu_begin();
  78. -#endif
  79.  #else
  80.  #ifdef TS_USEDFPU
  81.      struct thread_info *cur_thread = current_thread_info();
  82. @@ -6718,12 +6716,7 @@ void ATI_API_CALL KCL_fpu_begin(void)
  83.   */
  84.  void ATI_API_CALL KCL_fpu_end(void)
  85.  {
  86. -#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
  87. -    kernel_fpu_end();
  88. -#else
  89.      __kernel_fpu_end();
  90. -    preempt_enable();
  91. -#endif
  92.  }
  93.  
  94.  /** Create new directory entry under "/proc/...."
  95. diff --git a/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h b/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
  96. index aca2940..353fab5 100755
  97. --- a/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
  98. +++ b/src/archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
  99. @@ -668,7 +668,7 @@ extern unsigned long        KCL_SYSINFO_TimerTicksPerSecond;
  100.  #endif
  101.  
  102.  #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
  103. -#ifndef boot_cpu_has(X86_FEATURE_PGE)
  104. +#ifndef boot_cpu_has
  105.  #define boot_cpu_has(X86_FEATURE_PGE) test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability)
  106.  #endif
  107.  #else
  108. diff --git a/src/archive_files/common/lib/modules/fglrx/build_mod/kcl_ioctl.c b/src/archive_files/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
  109. index 44bb185..6a8515c 100755
  110. --- a/src/archive_files/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
  111. +++ b/src/archive_files/common/lib/modules/fglrx/build_mod/kcl_ioctl.c
  112. @@ -228,7 +228,7 @@ void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)
  113.      void __user *ret = COMPAT_ALLOC_USER_SPACE(size);
  114.  
  115.      /* prevent stack overflow */
  116. -    if (!access_ok(VERIFY_WRITE, ret, size))
  117. +    if (!access_ok(ret, size))
  118.          return NULL;
  119.  
  120.      return (void *)ret;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement