[Pkg-fglrx-devel] fglrx-modules-dkms DKMS fails with missing include/linux/smp_lock.h

Richard Ratzer richard.ratzer at googlemail.com
Mon Mar 28 15:14:36 UTC 2011


Package: fglrx-modules-dkms
Version: 1:11-2-2
Severity: wishlist
Tags: patch

Hello,

I think i'm a bit early, but ...
The following commits breaks non BKL kernel support:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4ba8216cd90560bc402f52076f64d8546e8aefcb

Item is that include/linux/smp_lock.h is remove. DKMS fails because it can't
find smp_lock.h

The following works for me on my laptop with different kernels
2.6.37 up to 2.6.38-1-amd64, but also some newest kernel like
2.6.38-1.slh.4-aptosid-amd64, kernels with and without BKL.
Hardware is AMD TURION TL60 (2x AMD64), RADEON 2600 - wheezy/sid

A possible solution might be this.

--- drmP.h.orig    2011-02-02 19:39:00.000000000 +0100
+++ drmP.h    2011-03-28 00:48:08.338428122 +0100
@@ -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__)
--- firegl_public.c.orig    2011-03-18 23:34:00.000000000 +0100
+++ firegl_public.c    2011-03-28 00:51:41.330750446 +0100
@@ -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>


please considder this patch

Cheers, Riichard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-fglrx-devel/attachments/20110328/fe6d68b2/attachment-0003.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xorg.0.log.2.6.38-1-amd64
Type: application/octet-stream
Size: 34502 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fglrx-devel/attachments/20110328/fe6d68b2/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Xorg.0.log.2.6.38-1.slh.4-aptosid-amd64
Type: application/octet-stream
Size: 34152 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fglrx-devel/attachments/20110328/fe6d68b2/attachment-0007.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fglrx-11-2_no_smp_lock_h.patch
Type: text/x-diff
Size: 1138 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-fglrx-devel/attachments/20110328/fe6d68b2/attachment-0003.patch>


More information about the Pkg-fglrx-devel mailing list