commit: 5c7604800fef9c0b99674970467fb9feec9ec723
Author: Emil Karlson <jekarlson <AT> gmail <DOT> com>
AuthorDate: Thu Feb 12 20:03:26 2015 +0000
Commit: Emil Karlson <jekarlson <AT> gmail <DOT> com>
CommitDate: Thu Feb 12 20:03:26 2015 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/x11.git;a=commit;h=5c760480
x11-drivers/ati-drivers: fix compile on linux-3.19
---
.../ati-drivers/ati-drivers-14.12-r3.ebuild | 2 +
.../get-percpu-without-preempt-on-linux-3.19.patch | 45 ++++++++++++++++++++++
2 files changed, 47 insertions(+)
diff --git a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
b/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
index b4aa191..a792e68 100644
--- a/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-14.12-r3.ebuild
@@ -327,6 +327,8 @@ src_prepare() {
# Compile fix, #526602
epatch "${FILESDIR}/use-kernel_fpu_begin.patch"
+ epatch "${FILESDIR}/get-percpu-without-preempt-on-linux-3.19.patch"
+
cd "${MODULE_DIR}"
# bugged fglrx build system, this file should be copied by hand
diff --git
a/x11-drivers/ati-drivers/files/get-percpu-without-preempt-on-linux-3.19.patch
b/x11-drivers/ati-drivers/files/get-percpu-without-preempt-on-linux-3.19.patch
new file mode 100644
index 0000000..d2c6f70
--- /dev/null
+++
b/x11-drivers/ati-drivers/files/get-percpu-without-preempt-on-linux-3.19.patch
@@ -0,0 +1,45 @@
+From 56ca74832b1f97c8e89329a313c7ca2405cd26cb Mon Sep 17 00:00:00 2001
+From: Emil Karlson <[email protected]>
+Date: Thu, 12 Feb 2015 21:59:46 +0200
+Subject: [PATCH] get percpu without preempton linux-3.19
+
+---
+ common/lib/modules/fglrx/build_mod/firegl_public.c | 15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c
b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index 360b6ac..3cba36e 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -4816,8 +4816,13 @@ static unsigned long kasSetExecutionLevel(unsigned long
level)
+ {
+ unsigned long orig_level;
+
+- orig_level = __get_cpu_var(kasExecutionLevel);
+- __get_cpu_var(kasExecutionLevel) = level;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++ orig_level = __get_cpu_var(kasExecutionLevel);
++ __get_cpu_var(kasExecutionLevel) = level;
++#else
++ orig_level = (*this_cpu_ptr(&(kasExecutionLevel)));
++ (*this_cpu_ptr(&(kasExecutionLevel))) = level;
++#endif
+
+ return orig_level;
+ }
+@@ -4829,7 +4834,11 @@ static unsigned long kasSetExecutionLevel(unsigned long
level)
+ */
+ static unsigned long kas_GetExecutionLevel(void)
+ {
+- return __get_cpu_var(kasExecutionLevel);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++ return __get_cpu_var(kasExecutionLevel);
++#else
++ return (*this_cpu_ptr(&(kasExecutionLevel)));
++#endif
+ }
+
+ /** \brief Type definition for kas_spin_lock() parameter */
+--
+2.0.5
+