summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVi0L02015-12-22 18:47:41 +0100
committerVi0L02015-12-22 18:47:41 +0100
commit64fb977e6c29ee79b0e9f01a84224c9c485d18c3 (patch)
treeec98aad855802cbdf2010430c071504f0a7c5943
parent6273ae5dff3692ae7cc297c3fbb14221c9e7b763 (diff)
downloadaur-64fb977e6c29ee79b0e9f01a84224c9c485d18c3.tar.gz
gcc49 no more + 4.4 kernel + grsec initial support
-rw-r--r--.SRCINFO27
-rw-r--r--4.2-amd-from_crimson_15.11.patch447
-rw-r--r--4.2-fglrx-has_fpu.patch20
-rw-r--r--4.2-kolasa-fpu_save_init.patch34
-rw-r--r--4.4-manjaro-xstate.patch22
-rw-r--r--PKGBUILD49
-rwxr-xr-xcatalyst_build_module2
-rw-r--r--crimson_i686_xg.patch12
-rw-r--r--grsec_arch.patch77
-rw-r--r--ubuntu_buildfix_kernel_4.0.patch13
-rw-r--r--ubuntu_buildfix_kernel_4.1.patch29
-rw-r--r--ubuntu_buildfix_kernel_4.2-build.copy_xregs_to_kernel.patch60
-rw-r--r--ubuntu_buildfix_kernel_4.2.patch114
13 files changed, 591 insertions, 315 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fe345d30b0c..f3fa66ffd37 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = catalyst-total
pkgdesc = AMD/ATI Catalyst drivers for linux. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED
pkgver = 15.9
- pkgrel = 6
+ pkgrel = 9
url = http://www.amd.com
install = catalyst-total.install
arch = i686
arch = x86_64
license = custom
depends = linux>=3.0
- depends = linux<4.4
+ depends = linux<4.5
depends = linux-headers
depends = xorg-server>=1.7.0
depends = xorg-server<1.18.0
@@ -23,7 +23,6 @@ pkgbase = catalyst-total
depends = patch
depends = libxinerama
depends = mesa>=10.1.0-4
- depends = gcc49
optdepends = qt4: to run ATi Catalyst Control Center (amdcccle)
optdepends = libxxf86vm: to run ATi Catalyst Control Center (amdcccle)
optdepends = opencl-headers: headers necessary for OpenCL development
@@ -78,16 +77,14 @@ pkgbase = catalyst-total
source = lano1106_fglrx_intel_iommu.patch
source = lano1106_kcl_agp_13_4.patch
source = fglrx_gpl_symbol.patch
- source = ubuntu_buildfix_kernel_4.0.patch
- source = ubuntu_buildfix_kernel_4.1.patch
- source = ubuntu_buildfix_kernel_4.2.patch
- source = 4.2-fglrx-has_fpu.patch
- source = 4.2-kolasa-fpu_save_init.patch
- source = ubuntu_buildfix_kernel_4.2-build.copy_xregs_to_kernel.patch
source = 4.3-kolasa-seq_printf.patch
source = 4.3-gentoo-mtrr.patch
+ source = 4.2-amd-from_crimson_15.11.patch
+ source = crimson_i686_xg.patch
+ source = 4.4-manjaro-xstate.patch
+ source = grsec_arch.patch
md5sums = d2de2df6946b452c266a3c892e6e46ff
- md5sums = f3aaed0084725304cf607f6915e4bfee
+ md5sums = 601d9c756571dd79d26944e54827631e
md5sums = af7fb8ee4fc96fd54c5b483e33dc71c4
md5sums = bdafe749e046bfddee2d1c5e90eabd83
md5sums = 9d9ea496eadf7e883d56723d65e96edf
@@ -109,14 +106,12 @@ pkgbase = catalyst-total
md5sums = 5184b94a2a40216a67996999481dd9ee
md5sums = c5156eddf81c8a1719b160d05a2e8d67
md5sums = ef97fc080ce7e5a275fe0c372bc2a418
- md5sums = 880d5e59554cda382f74206c202942be
- md5sums = 982451bcc1fa1ee3da53ffa481d65581
- md5sums = 88832af8d6769aa51fa9b266a74394e0
- md5sums = ed7748a593d6b894269f8c7856b7ae50
- md5sums = dd51495a1d8f2d1042f04a783bf01e08
- md5sums = 2f7d42fde403a1b4a22e5db8de738d0f
md5sums = 0e0666e95d1d590a7a83192805679485
md5sums = 98828e3eeaec2b3795e584883cc1b746
+ md5sums = fd2851026228ca72124972d1ea0335ea
+ md5sums = 6cdbaf5f71d867d225721a0369413616
+ md5sums = d9bea135ae3e1b3ca87c5bbe6dcf8e72
+ md5sums = 8941e91fc58cb44ce21ab9bda135754e
pkgname = catalyst-total
diff --git a/4.2-amd-from_crimson_15.11.patch b/4.2-amd-from_crimson_15.11.patch
new file mode 100644
index 00000000000..cd957917b1b
--- /dev/null
+++ b/4.2-amd-from_crimson_15.11.patch
@@ -0,0 +1,447 @@
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c
+--- 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-09-09 00:57:14.000000000 +0200
++++ 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-11-21 00:35:38.000000000 +0100
+@@ -191,9 +191,17 @@
+ #include <linux/string.h>
+ #include <linux/gfp.h>
+ #include <linux/swap.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ #include "asm/i387.h"
++#else
++#include <asm/fpu/api.h>
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ #include <asm/fpu-internal.h>
++#else
++#include <asm/fpu/internal.h>
++#endif
+ #endif
+
+ #include "firegl_public.h"
+@@ -1742,7 +1750,11 @@
+ unsigned long new, int size)
+ {
+ #ifndef __HAVE_ARCH_CMPXCHG
++#if defined(__i386__)
+ return __fgl_cmpxchg(ptr,old,new,size);
++#elif defined(__x86_64__)
++ return cmpxchg((unsigned long*)ptr,old,new);
++#endif
+ #else
+ /* On kernel version 2.6.34 passing a variable or unsupported size
+ * argument to the __cmpxchg macro causes the default-clause of a
+@@ -3503,10 +3515,12 @@
+ KCL_PUB_InterruptHandlerWrap,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+ ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)),
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
+ //when MSI enabled. keep irq disabled when calling the action handler,
+ //exclude this IRQ from irq balancing (only on one CPU)
+- ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
++ ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
++#else
++ ((useMSI) ? (0x0) : (IRQF_SHARED)),
+ #endif
+ dev_name,
+ context);
+@@ -5031,7 +5045,7 @@
+ orig_level = kasSetExecutionLevel(kasContext.exec_level_ih);
+
+ ret = kasContext.callback_wrapper_ret(ih_routine, ih_context);
+- KCL_DEBUG1(FN_FIREGL_KAS,"Interrupt handler returned 0x%08X\n", ret);
++ KCL_DEBUG1(FN_FIREGL_KAS,"Interrupt handler returned 0x%08X\n", ret);
+
+ kasSetExecutionLevel(orig_level);
+ spin_unlock(&kasContext.lock_ih);
+@@ -6436,21 +6450,36 @@
+ struct fpu *fpu = &tsk->thread.fpu;
+
+ if(static_cpu_has(X86_FEATURE_XSAVE)) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ fpu_xsave(fpu);
+ if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+- return 1;
++#else
++ copy_xregs_to_kernel(&fpu->state.xsave);
++ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
++#endif
++ return 1;
+ } else if (static_cpu_has(X86_FEATURE_FXSR)) {
+- fpu_fxsave(fpu);
+- } else {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
++ fpu_fxsave(fpu);
++#else
++ copy_fxregs_to_kernel(fpu);
++#endif
++} else {
+ asm volatile("fnsave %[fx]; fwait"
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ : [fx] "=m" (fpu->state->fsave));
+- return 0;
++#else
++ : [fx] "=m" (fpu->state.fsave));
++#endif
++ return 0;
+ }
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ if (unlikely(fpu->state->fxsave.swd & X87_FSW_ES)) {
+- asm volatile("fnclex");
+- return 0;
++ asm volatile("fnclex");
++ return 0;
+ }
++#endif
+ return 1;
+ }
+ #endif
+@@ -6462,8 +6491,13 @@
+ void ATI_API_CALL KCL_fpu_begin(void)
+ {
+ #ifdef CONFIG_X86_64
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ kernel_fpu_begin();
+ #else
++ preempt_disable();
++ __kernel_fpu_begin();
++#endif
++#else
+ #ifdef TS_USEDFPU
+ struct thread_info *cur_thread = current_thread_info();
+ struct task_struct *cur_task = get_current();
+@@ -6487,8 +6521,12 @@
+ /* The thread structure is changed with the commit below for kernel 3.3:
+ * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8
+ */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ if (cur_task->thread.fpu.has_fpu)
+ #else
++ if (cur_task->thread.fpu.fpregs_active)
++#endif
++#else
+ if (cur_task->thread.has_fpu)
+ #endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
+@@ -6508,7 +6546,12 @@
+ */
+ void ATI_API_CALL KCL_fpu_end(void)
+ {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ kernel_fpu_end();
++#else
++ __kernel_fpu_end();
++ preempt_enable();
++#endif
+ }
+
+ /** Create new directory entry under "/proc/...."
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.c
+--- 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.c 2015-09-09 00:57:14.000000000 +0200
++++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.c 2015-11-21 00:35:38.000000000 +0100
+@@ -35,10 +35,10 @@
+ #include <linux/kernel.h>
+ #include <linux/sysrq.h>
+ #include <linux/thread_info.h>
+-
++#include "firegl_public.h"
+ #include "kcl_debug.h"
+
+-extern void* ATI_API_CALL KCL_MEM_SmallBufferAllocAtomic(unsigned long size);
++extern void* ATI_API_CALL KCL_MEM_SmallBufferAllocAtomic(kcl_size_t size);
+ extern void ATI_API_CALL KCL_MEM_SmallBufferFree(void* p);
+
+ extern int ATI_API_CALL firegl_debug_dump(void);
+@@ -156,6 +156,47 @@
+ KCL_MEM_SmallBufferFree(buffer);
+ }
+
++/** \brief Print debug information to the OS debug console according to traceMask and debugMask
++ * \param traceMask Bit mask of enabled trace function
++ * \param debugMask Bit mask of enabled debug level. 0-7 total
++ * \param name function name
++ * \param line line number inside the file
++ * \param the print parameter
++ * \param fmt printf-like formatting string
++ * \param ... printf-like parameters
++ */
++void ATI_API_CALL KCL_DEBUG_Print_Trace(unsigned int traceMask, unsigned int debugMask, void* name, int line, long param, const char* fmt, ...)
++{
++ int print = firegl_trace(traceMask, debugMask, name, line, param);
++ if(print)
++ {
++ int len;
++ char* buffer=KCL_MEM_SmallBufferAllocAtomic(MAX_STRING_LENGTH);
++ if(buffer==NULL)
++ return;
++ if(fmt == NULL)
++ {
++ buffer[0] = '\n';
++ buffer[1] = '\0';
++ }
++ else
++ {
++ va_list marker;
++ va_start(marker, fmt);
++ kcl_vsnprintf(buffer,255,fmt, marker);
++ va_end(marker);
++ len = strlen(buffer);
++ if(buffer[len-1] != '\n')
++ {
++ buffer[len]='\n';
++ buffer[len+1]='\0';
++ }
++ }
++ KCL_DEBUG_Print("[fglrx] %s:%d %s", (char*)name, line, buffer);
++ KCL_MEM_SmallBufferFree(buffer);
++ }
++}
++
+ /** \brief Register keyboard handler to dump module internal state
+ * \param enable 1 to register the handler, 0 to unregister it
+ * \return 0
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.h 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.h
+--- 15.12/common/lib/modules/fglrx//build_mod/kcl_debug.h 2015-09-09 00:57:14.000000000 +0200
++++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_debug.h 2015-11-21 00:35:38.000000000 +0100
+@@ -64,17 +64,22 @@
+ FN_GENERIC_MAXIMUM = 0x3f
+ } FN_TRACE;
+
+-extern void ATI_API_CALL firegl_trace(unsigned int traceMask,
++extern int ATI_API_CALL firegl_trace(unsigned int traceMask,
+ unsigned int debugMask,
+ void* name,
+ int line,
+- long param,
+- const char* fmt,
+- ...);
++ long param);
+
+ #define MAX_STRING_LENGTH 512
+
+ void ATI_API_CALL KCL_DEBUG_Print(const char* fmt, ...);
++void ATI_API_CALL KCL_DEBUG_Print_Trace(unsigned int traceMask,
++ unsigned int debugMask,
++ void* name,
++ int line,
++ long param,
++ const char* fmt,
++ ...);
+ int ATI_API_CALL KCL_DEBUG_RegKbdHandler(int enable);
+ int ATI_API_CALL KCL_DEBUG_RegKbdDumpHandler(int enable);
+ void ATI_API_CALL KCL_DEBUG_OsDump(void);
+@@ -211,102 +216,106 @@
+ KCL_DEBUG_Print("<6>[fglrx] " fmt, ##arg)
+
+
+-#define KCL_DEBUG_TRACE(m, p, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_TRACE, \
+- (void*)__FUNCTION__, \
+- (int)(__LINE__), \
+- (long)(p), \
+- fmt, \
+- ##arg); \
++#define KCL_DEBUG_TRACE(m, p, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_TRACE, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ (long)(p), \
++ fmt, \
++ ##arg); \
+ } while (0)
+
+ #define KCL_DEBUG_TRACEIN KCL_DEBUG_TRACE
+
+-#define KCL_DEBUG_TRACEOUT(m, p, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_TRACEOUT, \
+- (void*)__FUNCTION__, \
+- (int)(__LINE__), \
+- (long)(p), \
+- fmt, \
+- ##arg); \
+- } while (0)
+-
+-#define KCL_DEBUG1(m, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_LEVEL1, \
+- (void*)__FUNCTION__, \
+- (int)__LINE__, \
+- 0, \
+- fmt, \
+- ##arg); \
+- } while (0)
+-
+-#define KCL_DEBUG2(m, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_LEVEL2, \
+- (void*)__FUNCTION__, \
+- (int)__LINE__, \
+- 0, \
+- fmt, \
+- ##arg); \
+- } while (0)
+-
+-#define KCL_DEBUG3(m, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_LEVEL3, \
+- (void*)__FUNCTION__, \
+- (int)__LINE__, \
+- 0, \
+- fmt, \
+- ##arg); \
+- } while (0)
+-
+-#define KCL_DEBUG4(m, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_LEVEL4, \
+- (void*)__FUNCTION__, \
+- (int)__LINE__, \
+- 0, \
+- fmt, \
+- ##arg); \
+- } while (0)
+-
+-#define KCL_DEBUG5(m, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_LEVEL5, \
+- (void*)__FUNCTION__, \
+- (int)__LINE__, \
+- 0, \
+- fmt, \
+- ##arg); \
+- } while (0)
+-
+-#define KCL_DEBUG6(m, fmt, arg...) \
+- do \
+- { \
+- firegl_trace(m, \
+- FN_DEBUG_LEVEL6, \
+- (void*)__FUNCTION__, \
+- (int)__LINE__, \
+- 0, \
+- fmt, \
+- ##arg); \
++#define KCL_DEBUG_TRACEOUT(m, p, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_TRACEOUT, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ (long)(p), \
++ fmt, \
++ ##arg); \
++ } while (0)
++
++
++#define KCL_DEBUG1(m, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_LEVEL1, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ 0, \
++ fmt, \
++ ##arg); \
++ } while (0)
++
++#define KCL_DEBUG2(m, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_LEVEL2, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ 0, \
++ fmt, \
++ ##arg); \
++ } while (0)
++
++#define KCL_DEBUG3(m, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_LEVEL3, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ 0, \
++ fmt, \
++ ##arg); \
++ } while (0)
++
++
++#define KCL_DEBUG4(m, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_LEVEL4, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ 0, \
++ fmt, \
++ ##arg); \
++ } while (0)
++
++
++#define KCL_DEBUG5(m, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_LEVEL5, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ 0, \
++ fmt, \
++ ##arg); \
++ } while (0)
++
++
++#define KCL_DEBUG6(m, fmt, arg...) \
++ do \
++ { \
++ KCL_DEBUG_Print_Trace(m, \
++ FN_DEBUG_LEVEL6, \
++ (void*)__FUNCTION__, \
++ (int)(__LINE__), \
++ 0, \
++ fmt, \
++ ##arg); \
+ } while (0)
+
+ #endif
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_str.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_str.c
+--- 15.12/common/lib/modules/fglrx//build_mod/kcl_str.c 2015-09-09 00:57:14.000000000 +0200
++++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_str.c 2015-11-21 00:35:38.000000000 +0100
+@@ -42,6 +42,10 @@
+ #include "kcl_type.h"
+ #include "kcl_str.h"
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
++#define strnicmp strncasecmp
++#endif
++
+ /** \brief Fill memory with a constant byte
+ * \param s Pointer to memory
+ * \param c Initializing value
diff --git a/4.2-fglrx-has_fpu.patch b/4.2-fglrx-has_fpu.patch
deleted file mode 100644
index 173ec888dc7..00000000000
--- a/4.2-fglrx-has_fpu.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-07-04 16:31:23.000000000 +0200
-+++ 15.7b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-08-21 15:26:44.860536831 +0200
-@@ -6475,6 +6475,7 @@
- */
- struct task_struct *cur_task = current;
- preempt_disable();
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
- /* The thread structure is changed with the commit below for kernel 3.3:
- * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8
-@@ -6483,6 +6484,9 @@
- #else
- if (cur_task->thread.has_fpu)
- #endif
-+#else
-+ if (cur_task->thread.fpu.fpregs_active)
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
- KCL_fpu_save_init(cur_task);
- #else
diff --git a/4.2-kolasa-fpu_save_init.patch b/4.2-kolasa-fpu_save_init.patch
deleted file mode 100644
index 6d2e4e70c0f..00000000000
--- a/4.2-kolasa-fpu_save_init.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- 15.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-20 18:29:19.488890309 +0200
-+++ 15.9b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-20 14:20:51.000000000 +0200
-@@ -6505,11 +6505,15 @@
- struct task_struct *cur_task = get_current();
- preempt_disable();
- if (cur_thread->status & TS_USEDFPU)
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+ copy_fpregs_to_fpstate(&cur_task->thread.fpu);
-+#else
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
- KCL_fpu_save_init(cur_task);
- #else
- __save_init_fpu(cur_task);
- #endif
-+#endif
- else
- clts();
-
-@@ -6531,11 +6535,15 @@
- #else
- if (cur_task->thread.fpu.fpregs_active)
- #endif
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+ copy_fpregs_to_fpstate(&cur_task->thread.fpu);
-+#else
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)
- KCL_fpu_save_init(cur_task);
- #else
- __save_init_fpu(cur_task);
- #endif
-+#endif
- else
- clts();
- #endif
diff --git a/4.4-manjaro-xstate.patch b/4.4-manjaro-xstate.patch
new file mode 100644
index 00000000000..c221952d5ec
--- /dev/null
+++ b/4.4-manjaro-xstate.patch
@@ -0,0 +1,22 @@
+--- 15.12/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100
++++ 15.12b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-19 20:48:13.223261632 +0100
+@@ -6450,12 +6450,15 @@
+ struct fpu *fpu = &tsk->thread.fpu;
+
+ if(static_cpu_has(X86_FEATURE_XSAVE)) {
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+- fpu_xsave(fpu);
+- if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+-#else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++ copy_xregs_to_kernel(&fpu->state.xsave);
++ if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP))
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+ copy_xregs_to_kernel(&fpu->state.xsave);
+ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
++#else
++ fpu_xsave(fpu);
++ if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+ #endif
+ return 1;
+ } else if (static_cpu_has(X86_FEATURE_FXSR)) {
diff --git a/PKGBUILD b/PKGBUILD
index 4a715c8af86..c2e07094d29 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,15 +19,16 @@
# Contributor: zoopp
# Contributor: solar (authatieventsd' patch s/-1/255)
# Contributor: Cold (current_euid patch)
-# Contributor: ubuntu (parts of 4.0, 4.1 and 4.2 kernel patches)
-# Contributor: kolasa (parts of 4.2 and 4.3 kernel patches)
+# Contributor: kolasa (part of 4.3 kernel patches)
# Contributor: gentoo (part of 4.3 kernel patches)
+# Contributor: Philip Müller @ Manjaro (4.4 kernel patch)
+
# PKGEXT='.pkg.tar.gz' # imho time to pack this pkg into tar.xz is too long, unfortunatelly yaourt got problems when ext is different from .pkg.tar.xz - V
pkgname=catalyst-total
pkgver=15.9
-pkgrel=6
+pkgrel=9
# _betano=1.0
_amdver=15.201.1151
pkgdesc="AMD/ATI Catalyst drivers for linux. catalyst-hook + catalyst-utils + lib32-catalyst-utils + experimental powerXpress suppport. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED"
@@ -35,7 +36,7 @@ arch=('i686' 'x86_64')
url="http://www.amd.com"
license=('custom')
options=('staticlibs' 'libtool' '!strip' '!upx')
-depends=('linux>=3.0' 'linux<4.4' 'linux-headers' 'xorg-server>=1.7.0' 'xorg-server<1.18.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama' 'mesa>=10.1.0-4' 'gcc49')
+depends=('linux>=3.0' 'linux<4.5' 'linux-headers' 'xorg-server>=1.7.0' 'xorg-server<1.18.0' 'libxrandr' 'libsm' 'fontconfig' 'libxcursor' 'libxi' 'gcc-libs' 'gcc>4.0.0' 'make' 'patch' 'libxinerama' 'mesa>=10.1.0-4')
optdepends=('qt4: to run ATi Catalyst Control Center (amdcccle)'
'libxxf86vm: to run ATi Catalyst Control Center (amdcccle)'
'opencl-headers: headers necessary for OpenCL development'
@@ -91,17 +92,15 @@ source=(
lano1106_fglrx_intel_iommu.patch
lano1106_kcl_agp_13_4.patch
fglrx_gpl_symbol.patch
- ubuntu_buildfix_kernel_4.0.patch
- ubuntu_buildfix_kernel_4.1.patch
- ubuntu_buildfix_kernel_4.2.patch
- 4.2-fglrx-has_fpu.patch
- 4.2-kolasa-fpu_save_init.patch
- ubuntu_buildfix_kernel_4.2-build.copy_xregs_to_kernel.patch
4.3-kolasa-seq_printf.patch
- 4.3-gentoo-mtrr.patch)
+ 4.3-gentoo-mtrr.patch
+ 4.2-amd-from_crimson_15.11.patch
+ crimson_i686_xg.patch
+ 4.4-manjaro-xstate.patch
+ grsec_arch.patch)
md5sums=('d2de2df6946b452c266a3c892e6e46ff'
- 'f3aaed0084725304cf607f6915e4bfee'
+ '601d9c756571dd79d26944e54827631e'
'af7fb8ee4fc96fd54c5b483e33dc71c4'
'bdafe749e046bfddee2d1c5e90eabd83'
'9d9ea496eadf7e883d56723d65e96edf'
@@ -123,14 +122,12 @@ md5sums=('d2de2df6946b452c266a3c892e6e46ff'
'5184b94a2a40216a67996999481dd9ee'
'c5156eddf81c8a1719b160d05a2e8d67'
'ef97fc080ce7e5a275fe0c372bc2a418'
- '880d5e59554cda382f74206c202942be'
- '982451bcc1fa1ee3da53ffa481d65581'
- '88832af8d6769aa51fa9b266a74394e0'
- 'ed7748a593d6b894269f8c7856b7ae50'
- 'dd51495a1d8f2d1042f04a783bf01e08'
- '2f7d42fde403a1b4a22e5db8de738d0f'
'0e0666e95d1d590a7a83192805679485'
- '98828e3eeaec2b3795e584883cc1b746')
+ '98828e3eeaec2b3795e584883cc1b746'
+ 'fd2851026228ca72124972d1ea0335ea'
+ '6cdbaf5f71d867d225721a0369413616'
+ 'd9bea135ae3e1b3ca87c5bbe6dcf8e72'
+ '8941e91fc58cb44ce21ab9bda135754e')
build() {
@@ -312,17 +309,13 @@ package() {
patch -Np1 -i ../makefile_compat.patch
patch -Np1 -i ../lano1106_fglrx_intel_iommu.patch
patch -Np1 -i ../lano1106_kcl_agp_13_4.patch
-# test "${CARCH}" = "i686" && patch -Np1 -i ../fglrx_gpl_symbol.patch
-# since 3.19 not only i686 needs gpl symbol - V
- patch -Np1 -i ../fglrx_gpl_symbol.patch
- patch -Np1 -i ../ubuntu_buildfix_kernel_4.0.patch
- patch -Np1 -i ../ubuntu_buildfix_kernel_4.1.patch
- patch -Np1 -i ../ubuntu_buildfix_kernel_4.2.patch
- patch -Np1 -i ../4.2-fglrx-has_fpu.patch
- patch -Np1 -i ../4.2-kolasa-fpu_save_init.patch
- patch -Np1 -i ../ubuntu_buildfix_kernel_4.2-build.copy_xregs_to_kernel.patch
+ patch -Np1 -i ../4.2-amd-from_crimson_15.11.patch
patch -Np1 -i ../4.3-kolasa-seq_printf.patch
patch -Np1 -i ../4.3-gentoo-mtrr.patch
+ test "${CARCH}" = "i686" && patch -Np1 -i ../fglrx_gpl_symbol.patch
+ test "${CARCH}" = "i686" && patch -Np1 -i ../crimson_i686_xg.patch
+ patch -Np1 -i ../4.4-manjaro-xstate.patch
+ patch -Np1 -i ../grsec_arch.patch
# Prepare modules source files
_archdir=x86_64
diff --git a/catalyst_build_module b/catalyst_build_module
index 0afc3130c19..02d75f9e4c4 100755
--- a/catalyst_build_module
+++ b/catalyst_build_module
@@ -35,7 +35,7 @@ install_module(){
## Compile module using _ati_check variables
CFLAGS_MODULE="-DMODULE -DATI -DFGL -DPAGE_ATTR_FIX=$PAGE_ATTR_FIX -DCOMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE $def_smp $def_modversions"
- make CC=gcc-4.9 -C /usr/lib/modules/${kernver}/build SUBDIRS="`pwd`" ARCH=${arch} \
+ make -C /usr/lib/modules/${kernver}/build SUBDIRS="`pwd`" ARCH=${arch} \
MODFLAGS="$CFLAGS_MODULE" \
CFLAGS_MODULE="$CFLAGS_MODULE" \
PAGE_ATTR_FIX=$PAGE_ATTR_FIX COMPAT_ALLOC_USER_SPACE=$COMPAT_ALLOC_USER_SPACE modules || return 1
diff --git a/crimson_i686_xg.patch b/crimson_i686_xg.patch
new file mode 100644
index 00000000000..e3ce379f33d
--- /dev/null
+++ b/crimson_i686_xg.patch
@@ -0,0 +1,12 @@
+--- 15.11/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-11-21 00:35:38.000000000 +0100
++++ 15.11b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-11-24 22:28:02.113843493 +0100
+@@ -1714,6 +1714,9 @@
+
+ #if defined(__i386__)
+ #ifndef __HAVE_ARCH_CMPXCHG
++#ifndef __xg
++#define __xg(x) ((volatile long *)(x))
++#endif
+ static inline
+ unsigned long __fgl_cmpxchg(volatile void *ptr, unsigned long old,
+ unsigned long new, int size)
diff --git a/grsec_arch.patch b/grsec_arch.patch
new file mode 100644
index 00000000000..323e44fd02f
--- /dev/null
+++ b/grsec_arch.patch
@@ -0,0 +1,77 @@
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c
+--- 15.12/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-12-19 21:14:13.251002548 +0100
++++ 15.12b/common/lib/modules/fglrx//build_mod/firegl_public.c 2015-12-19 21:36:27.703783498 +0100
+@@ -6465,11 +6465,21 @@
+
+ if(static_cpu_has(X86_FEATURE_XSAVE)) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)
++#ifdef CONFIG_GRKERNSEC
++ copy_xregs_to_kernel(&fpu->state->xsave);
++ if (!(fpu->state->xsave.header.xfeatures & XFEATURE_MASK_FP))
++#else
+ copy_xregs_to_kernel(&fpu->state.xsave);
+ if (!(fpu->state.xsave.header.xfeatures & XFEATURE_MASK_FP))
++#endif
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
++#ifdef CONFIG_GRKERNSEC
++ copy_xregs_to_kernel(&fpu->state->xsave);
++ if (!(fpu->state->xsave.header.xfeatures & XSTATE_FP))
++#else
+ copy_xregs_to_kernel(&fpu->state.xsave);
+ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
++#endif
+ #else
+ fpu_xsave(fpu);
+ if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+@@ -6486,8 +6496,12 @@
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ : [fx] "=m" (fpu->state->fsave));
+ #else
++#ifdef CONFIG_GRKERNSEC
++ : [fx] "=m" (fpu->state->fsave));
++#else
+ : [fx] "=m" (fpu->state.fsave));
+ #endif
++#endif
+ return 0;
+ }
+
+diff -uNr 15.12/common/lib/modules/fglrx//build_mod/kcl_acpi.c 15.12b/common/lib/modules/fglrx//build_mod/kcl_acpi.c
+--- 15.12/common/lib/modules/fglrx//build_mod/kcl_acpi.c 2015-12-19 21:14:13.247669219 +0100
++++ 15.12b/common/lib/modules/fglrx//build_mod/kcl_acpi.c 2015-12-19 21:10:27.224899708 +0100
+@@ -145,7 +145,11 @@
+ return NOTIFY_OK;
+ }
+
++#ifdef CONFIG_GRKERNSEC
++static notifier_block_no_const firegl_acpi_lid_notifier = {
++#else
+ static struct notifier_block firegl_acpi_lid_notifier = {
++#endif
+ .notifier_call = firegl_acpi_lid_event,
+ };
+ #endif
+@@ -400,7 +404,11 @@
+ KCL_DEBUG_ERROR ("Could not allocate enough memory for video notifier_block\n");
+ return -ENOMEM;
+ }
++#ifdef CONFIG_GRKERNSEC
++ ((notifier_block_no_const*)(*nb))->notifier_call = firegl_acpi_video_event;
++#else
+ ((struct notifier_block*)(*nb))->notifier_call = firegl_acpi_video_event;
++#endif
+ return register_acpi_notifier((struct notifier_block*)(*nb));
+ }
+
+@@ -413,7 +421,11 @@
+ KCL_DEBUG_ERROR ("Could not allocate enough memory for ac notifier_block\n");
+ return -ENOMEM;
+ }
++#ifdef CONFIG_GRKERNSEC
++ ((notifier_block_no_const*)(*nb))->notifier_call = firegl_acpi_ac_event;
++#else
+ ((struct notifier_block*)(*nb))->notifier_call = firegl_acpi_ac_event;
++#endif
+ return register_acpi_notifier((struct notifier_block*)(*nb));
+ }
+
diff --git a/ubuntu_buildfix_kernel_4.0.patch b/ubuntu_buildfix_kernel_4.0.patch
deleted file mode 100644
index 91ae3ea24f4..00000000000
--- a/ubuntu_buildfix_kernel_4.0.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- 15.7/common/lib/modules/fglrx/build_mod/kcl_str.c
-+++ 15.7b/common/lib/modules/fglrx/build_mod/kcl_str.c
-@@ -42,6 +42,10 @@
- #include "kcl_type.h"
- #include "kcl_str.h"
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
-+#define strnicmp strncasecmp
-+#endif
-+
- /** \brief Fill memory with a constant byte
- * \param s Pointer to memory
- * \param c Initializing value
diff --git a/ubuntu_buildfix_kernel_4.1.patch b/ubuntu_buildfix_kernel_4.1.patch
deleted file mode 100644
index cf3dda0bfc5..00000000000
--- a/ubuntu_buildfix_kernel_4.1.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 94631bfd9b813d9d2f1af0ea744e7121d72d25c5 Mon Sep 17 00:00:00 2001
-From: Alberto Milone <alberto.milone@canonical.com>
-Date: Fri, 10 Jul 2015 16:52:29 +0200
-Subject: [PATCH 1/2] Add support for Linux 4.1
-
-Drop the IRQF_DISABLED flag, as it was removed in Linux 4.1
-
-Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
----
- firegl_public.c | 4 +++-
- kcl_acpi.c | 4 ++++
- 2 files changed, 7 insertions(+), 1 deletion(-)
-
---- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ 15.7b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -3495,10 +3495,12 @@ int ATI_API_CALL KCL_InstallInterruptHandler(
- KCL_PUB_InterruptHandlerWrap,
- #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
- ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)),
--#else
-+#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
- //when MSI enabled. keep irq disabled when calling the action handler,
- //exclude this IRQ from irq balancing (only on one CPU)
- ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),
-+#else
-+ ((useMSI) ? (0x0) : (IRQF_SHARED)),
- #endif
- dev_name,
- context); \ No newline at end of file
diff --git a/ubuntu_buildfix_kernel_4.2-build.copy_xregs_to_kernel.patch b/ubuntu_buildfix_kernel_4.2-build.copy_xregs_to_kernel.patch
deleted file mode 100644
index b92c64fd5b9..00000000000
--- a/ubuntu_buildfix_kernel_4.2-build.copy_xregs_to_kernel.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- 15.9/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-27 10:59:10.121499353 +0200
-+++ 15.9b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-09-27 10:59:31.869133789 +0200
-@@ -6446,6 +6446,48 @@
- return i;
- }
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
-+/*
-+ * Save processor xstate to xsave area.
-+ */
-+static void _copy_xregs_to_kernel(struct xregs_state *xstate)
-+{
-+ u64 mask = -1;
-+ u32 lmask = mask;
-+ u32 hmask = mask >> 32;
-+ int err = 0;
-+
-+ /*WARN_ON(!alternatives_patched);*/
-+
-+ /*
-+ * If xsaves is enabled, xsaves replaces xsaveopt because
-+ * it supports compact format and supervisor states in addition to
-+ * modified optimization in xsaveopt.
-+ *
-+ * Otherwise, if xsaveopt is enabled, xsaveopt replaces xsave
-+ * because xsaveopt supports modified optimization which is not
-+ * supported by xsave.
-+ *
-+ * If none of xsaves and xsaveopt is enabled, use xsave.
-+ */
-+ alternative_input_2(
-+ "1:"XSAVE,
-+ XSAVEOPT,
-+ X86_FEATURE_XSAVEOPT,
-+ XSAVES,
-+ X86_FEATURE_XSAVES,
-+ [xstate] "D" (xstate), "a" (lmask), "d" (hmask) :
-+ "memory");
-+ asm volatile("2:\n\t"
-+ xstate_fault(err)
-+ : "0" (err)
-+ : "memory");
-+
-+ /* We should never fault when copying to a kernel buffer: */
-+ WARN_ON_FPU(err);
-+}
-+#endif
-+
- /** \brief Generate UUID
- * \param buf pointer to the generated UUID
- * \return None
-@@ -6465,7 +6507,7 @@
- fpu_xsave(fpu);
- if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
- #else
-- copy_xregs_to_kernel(&fpu->state.xsave);
-+ _copy_xregs_to_kernel(&fpu->state.xsave);
- if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
- #endif
- return 1;
diff --git a/ubuntu_buildfix_kernel_4.2.patch b/ubuntu_buildfix_kernel_4.2.patch
deleted file mode 100644
index 9aa71bb1143..00000000000
--- a/ubuntu_buildfix_kernel_4.2.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From eb7beb0ea51de526e59a0c3edc76530b28ef10e7 Mon Sep 17 00:00:00 2001
-From: Alberto Milone <alberto.milone@canonical.com>
-Date: Tue, 14 Jul 2015 12:56:37 +0200
-Subject: [PATCH 1/1] Add support for Linux 4.2
-
-Deal with the FPU code renaming
----
- firegl_public.c | 38 ++++++++++++++++++++++++++++++++++++++
- 1 file changed, 38 insertions(+)
-
---- 15.7/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ 15.7b/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -191,9 +191,17 @@
- #include <linux/string.h>
- #include <linux/gfp.h>
- #include <linux/swap.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- #include "asm/i387.h"
-+#else
-+#include <asm/fpu/api.h>
-+#endif
- #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- #include <asm/fpu-internal.h>
-+#else
-+#include <asm/fpu/internal.h>
-+#endif
- #endif
-
- #include "firegl_public.h"
-@@ -1698,6 +1706,9 @@ void ATI_API_CALL KCL_SetCurrentProcessState(KCL_ENUM_ProcessState state)
-
- #if defined(__i386__)
- #ifndef __HAVE_ARCH_CMPXCHG
-+#ifndef __xg
-+#define __xg(x) ((volatile long *)(x))
-+#endif
- static inline
- unsigned long __fgl_cmpxchg(volatile void *ptr, unsigned long old,
- unsigned long new, int size)
-@@ -1734,7 +1745,11 @@ unsigned long ATI_API_CALL kcl__cmpxchg(volatile void *ptr, unsigned long old,
- unsigned long new, int size)
- {
- #ifndef __HAVE_ARCH_CMPXCHG
-+#if defined(__i386__)
- return __fgl_cmpxchg(ptr,old,new,size);
-+#elif defined(__x86_64__)
-+ return cmpxchg((unsigned long*)ptr,old,new);
-+#endif
- #else
- /* On kernel version 2.6.34 passing a variable or unsupported size
- * argument to the __cmpxchg macro causes the default-clause of a
-@@ -6430,21 +6445,36 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
- struct fpu *fpu = &tsk->thread.fpu;
-
- if(static_cpu_has(X86_FEATURE_XSAVE)) {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- fpu_xsave(fpu);
- if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
-+#else
-+ copy_xregs_to_kernel(&fpu->state.xsave);
-+ if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
-+#endif
- return 1;
- } else if (static_cpu_has(X86_FEATURE_FXSR)) {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- fpu_fxsave(fpu);
-+#else
-+ copy_fxregs_to_kernel(fpu);
-+#endif
- } else {
- asm volatile("fnsave %[fx]; fwait"
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- : [fx] "=m" (fpu->state->fsave));
-+#else
-+ : [fx] "=m" (fpu->state.fsave));
-+#endif
- return 0;
- }
-
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- if (unlikely(fpu->state->fxsave.swd & X87_FSW_ES)) {
- asm volatile("fnclex");
- return 0;
- }
-+#endif
- return 1;
- }
- #endif
-@@ -6456,8 +6486,12 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
- void ATI_API_CALL KCL_fpu_begin(void)
- {
- #ifdef CONFIG_X86_64
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- kernel_fpu_begin();
- #else
-+ __kernel_fpu_begin();
-+#endif
-+#else
- #ifdef TS_USEDFPU
- struct thread_info *cur_thread = current_thread_info();
- struct task_struct *cur_task = get_current();
-@@ -6502,7 +6536,11 @@ void ATI_API_CALL KCL_fpu_begin(void)
- */
- void ATI_API_CALL KCL_fpu_end(void)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- kernel_fpu_end();
-+#else
-+ __kernel_fpu_end();
-+#endif
- }
-
- /** Create new directory entry under "/proc/...."