packages: xorg-driver-video-fglrx/xorg-driver-video-fglrx-no-bkl.patch (NEW...

baggins baggins at pld-linux.org
Thu Jul 14 21:26:38 CEST 2011


Author: baggins                      Date: Thu Jul 14 19:26:37 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- BKL has been removed in recent kernels, don't try to use it

---- Files affected:
packages/xorg-driver-video-fglrx:
   xorg-driver-video-fglrx-no-bkl.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/xorg-driver-video-fglrx/xorg-driver-video-fglrx-no-bkl.patch
diff -u /dev/null packages/xorg-driver-video-fglrx/xorg-driver-video-fglrx-no-bkl.patch:1.1
--- /dev/null	Thu Jul 14 21:26:38 2011
+++ packages/xorg-driver-video-fglrx/xorg-driver-video-fglrx-no-bkl.patch	Thu Jul 14 21:26:32 2011
@@ -0,0 +1,63 @@
+# Do not include smp_lock.h if the Kernel is built without BKL.
+# Closes: #619952
+
+diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h
+--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-24 17:00:28.000000000 +0100
++++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h	2011-03-29 20:39:05.000000000 +0200
+@@ -57,7 +57,11 @@
+ #include <linux/pci.h>
+ #include <linux/version.h>
+ #include <linux/sched.h>
++/* with no Big Kernel Lock and linux 2.6.38
++   and higher smp_lock.h is removed      */
++#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
+ #include <linux/smp_lock.h>	/* For (un)lock_kernel */
++#endif
+ #include <linux/mm.h>
+ #include <linux/pagemap.h>
+ #if defined(__alpha__) || defined(__powerpc__)
+diff -Naur fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:37:04.000000000 +0200
++++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-03-29 20:39:05.000000000 +0200
+@@ -116,7 +116,16 @@
+ #include <linux/pci.h>
+ #include <linux/wait.h>
+ #include <linux/miscdevice.h>
+-#include <linux/smp_lock.h>
++
++/* with no Big Kernel Lock and linux 2.6.38
++   and higher is smp_lock.h removed.
++   instead of smp_lock.h is sched.h required    */
++#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
++#include <linux/smp_lock.h>	/* For (un)lock_kernel */
++#else
++#include <linux/sched.h>
++#endif
++
+ // newer SuSE kernels need this
+ #include <linux/highmem.h>
+ 
+Description: add support for missing kernel lock
+Author: Pascal Giard <evilynux at gmail.com>
+
+diff -Naur fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:30:08.000000000 +0200
++++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c	2011-04-27 21:29:27.000000000 +0200
+@@ -1902,13 +1902,17 @@
+ /** \brief Grab global kernel lock */
+ void ATI_API_CALL KCL_GlobalKernelLock(void)
+ {
++#ifdef CONFIG_KERNEL_LOCK
+     lock_kernel();
++#endif
+ }
+ 
+ /** \brief Release global kernel lock */
+ void ATI_API_CALL KCL_GlobalKernelUnlock(void)
+ {
++#ifdef CONFIG_KERNEL_LOCK
+     unlock_kernel();
++#endif
+ }
+ 
+ /*****************************************************************************/
================================================================


More information about the pld-cvs-commit mailing list