]> git.pld-linux.org Git - packages/xorg-driver-video-fglrx.git/blob - xorg-driver-video-fglrx-no-bkl.patch
- BKL has been removed in recent kernels, don't try to use it
[packages/xorg-driver-video-fglrx.git] / xorg-driver-video-fglrx-no-bkl.patch
1 # Do not include smp_lock.h if the Kernel is built without BKL.
2 # Closes: #619952
3
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
7 @@ -57,7 +57,11 @@
8  #include <linux/pci.h>
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 */
15 +#endif
16  #include <linux/mm.h>
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
22 @@ -116,7 +116,16 @@
23  #include <linux/pci.h>
24  #include <linux/wait.h>
25  #include <linux/miscdevice.h>
26 -#include <linux/smp_lock.h>
27 +
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 */
33 +#else
34 +#include <linux/sched.h>
35 +#endif
36 +
37  // newer SuSE kernels need this
38  #include <linux/highmem.h>
39  
40 Description: add support for missing kernel lock
41 Author: Pascal Giard <evilynux@gmail.com>
42
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)
49  {
50 +#ifdef CONFIG_KERNEL_LOCK
51      lock_kernel();
52 +#endif
53  }
54  
55  /** \brief Release global kernel lock */
56  void ATI_API_CALL KCL_GlobalKernelUnlock(void)
57  {
58 +#ifdef CONFIG_KERNEL_LOCK
59      unlock_kernel();
60 +#endif
61  }
62  
63  /*****************************************************************************/
This page took 0.083766 seconds and 3 git commands to generate.