1 # Do not include smp_lock.h if the Kernel is built without BKL.
4 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
5 --- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/drmP.h 2011-03-24 17:00:28.000000000 +0100
6 +++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/drmP.h 2011-03-29 20:39:05.000000000 +0200
9 #include <linux/version.h>
10 #include <linux/sched.h>
11 +/* with no Big Kernel Lock and linux 2.6.38
12 + and higher smp_lock.h is removed */
13 +#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
14 #include <linux/smp_lock.h> /* For (un)lock_kernel */
17 #include <linux/pagemap.h>
18 #if defined(__alpha__) || defined(__powerpc__)
19 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
20 --- fglrx-driver-11-3.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-03-29 20:37:04.000000000 +0200
21 +++ fglrx-driver-11-3/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-03-29 20:39:05.000000000 +0200
23 #include <linux/pci.h>
24 #include <linux/wait.h>
25 #include <linux/miscdevice.h>
26 -#include <linux/smp_lock.h>
28 +/* with no Big Kernel Lock and linux 2.6.38
29 + and higher is smp_lock.h removed.
30 + instead of smp_lock.h is sched.h required */
31 +#ifdef CONFIG_KERNEL_LOCK || LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
32 +#include <linux/smp_lock.h> /* For (un)lock_kernel */
34 +#include <linux/sched.h>
37 // newer SuSE kernels need this
38 #include <linux/highmem.h>
40 Description: add support for missing kernel lock
41 Author: Pascal Giard <evilynux@gmail.com>
43 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
44 --- fglrx-driver-11-4.orig/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:30:08.000000000 +0200
45 +++ fglrx-driver-11-4/common/lib/modules/fglrx/build_mod/firegl_public.c 2011-04-27 21:29:27.000000000 +0200
46 @@ -1902,13 +1902,17 @@
47 /** \brief Grab global kernel lock */
48 void ATI_API_CALL KCL_GlobalKernelLock(void)
50 +#ifdef CONFIG_KERNEL_LOCK
55 /** \brief Release global kernel lock */
56 void ATI_API_CALL KCL_GlobalKernelUnlock(void)
58 +#ifdef CONFIG_KERNEL_LOCK
63 /*****************************************************************************/