Bug#624644: nvidia-kernel-dkms: module does not build on kernels >= 2.6.39-rc1

Antonio Ospite ospite at studenti.unina.it
Sat Apr 30 10:01:22 UTC 2011


Package: nvidia-kernel-dkms
Version: 270.30-1
Severity: normal
Tags: upstream patch

Hi,

the module does not build on kernels >= 2.6.39-rc1 because the file 
linux/smp_lock.h is not there anymore. Since the code does not use 
kernel_locked() at all, the include can just be dropped.

The attached patch makes the module build, and I verified it works fine 
too :)

The same patch applies also to the nvidia-260.19.44 currently in 
unstable.

Thanks,
   Antonio Ospite
   http://ao2.it

-- Package-specific info:
uname -a:
Linux jcn 2.6.39-rc5-ao2 #1 SMP Wed Apr 27 15:03:23 CEST 2011 x86_64 GNU/Linux

/proc/version:
Linux version 2.6.39-rc5-ao2 (ao2 at jcn) (gcc version 4.5.2 (Debian 4.5.2-11) ) #1 SMP Wed Apr 27 15:03:23 CEST 2011

/proc/driver/nvidia/version:
NVRM version: NVIDIA UNIX x86_64 Kernel Module  270.30  Fri Feb 25 14:34:55 PST 2011
GCC version:  gcc version 4.6.1 20110428 (prerelease) (Debian 4.6.0-6) 

lspci 'VGA compatible controller [0300]':
02:00.0 VGA compatible controller [0300]: nVidia Corporation C77 [GeForce 8200] [10de:0849] (rev a2) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device [1043:82f2]
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0
	Interrupt: pin A routed to IRQ 20
	Region 0: Memory at fd000000 (32-bit, non-prefetchable) [size=16M]
	Region 1: Memory at f0000000 (64-bit, prefetchable) [size=128M]
	Region 3: Memory at fa000000 (64-bit, prefetchable) [size=32M]
	Region 5: I/O ports at ec00 [size=128]
	[virtual] Expansion ROM at febe0000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: nvidia

OpenGL and NVIDIA library files installed:
lrwxrwxrwx 1 root root       35 Feb 16 19:42 /etc/alternatives/libGL.so -> /usr/lib/nvidia/diversions/libGL.so
lrwxrwxrwx 1 root root       26 Feb 16 19:42 /etc/alternatives/libGL.so.1 -> /usr/lib/nvidia/libGL.so.1
lrwxrwxrwx 1 root root       26 Feb 16 19:42 /usr/lib/libGL.so -> /etc/alternatives/libGL.so
lrwxrwxrwx 1 root root       28 Feb 16 19:42 /usr/lib/libGL.so.1 -> /etc/alternatives/libGL.so.1
lrwxrwxrwx 1 root root       23 Mar 22 07:51 /usr/lib/libnvidia-cfg.so.1 -> libnvidia-cfg.so.270.30
-rw-r--r-- 1 root root   132584 Feb 25 23:54 /usr/lib/libnvidia-cfg.so.270.30
-rw-r--r-- 1 root root 27475280 Feb 25 23:50 /usr/lib/libnvidia-glcore.so.270.30
-rw-r--r-- 1 root root     6008 Feb 25 23:53 /usr/lib/libnvidia-tls.so.270.30
lrwxrwxrwx 1 root root       12 Mar 19 23:24 /usr/lib32/libGL.so.1 -> libGL.so.1.2
-rw-r--r-- 1 root root   401528 Jul 15  2010 /usr/lib32/libGL.so.1.2

/usr/lib/nvidia:
total 7324
drwxr-xr-x   3 root root    4096 Apr 30 11:31 .
drwxr-xr-x 261 root root  126976 Apr 30 11:31 ..
-rwxr-xr-x   1 root root    1294 Feb 22 19:37 check-for-conflicting-opengl-libraries
drwxr-xr-x   2 root root    4096 Apr 11 10:07 diversions
lrwxrwxrwx   1 root root      15 Mar 22 07:51 libGL.so.1 -> libGL.so.270.30
-rw-r--r--   1 root root 1004112 Feb 25 23:51 libGL.so.270.30
lrwxrwxrwx   1 root root      16 Mar 22 07:51 libglx.so -> libglx.so.270.30
-rw-r--r--   1 root root 6325736 Feb 25 23:53 libglx.so.270.30
-rwxr-xr-x   1 root root     441 Feb 22 19:37 pre-install

/usr/lib/nvidia/diversions:
total 896
drwxr-xr-x 2 root root   4096 Apr 11 10:07 .
drwxr-xr-x 3 root root   4096 Apr 30 11:31 ..
-rw-r--r-- 1 root root    189 Mar 17 06:39 dummy.txt
lrwxrwxrwx 1 root root     10 Apr 11 01:49 libGL.so -> libGL.so.1
lrwxrwxrwx 1 root root     12 Apr 11 01:49 libGL.so.1 -> libGL.so.1.2
-rw-r--r-- 1 root root 477600 Apr 11 01:49 libGL.so.1.2
-rw-r--r-- 1 root root 416168 Mar 26 04:49 libglx.so

Files from nvidia-installer:



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (900, 'unstable'), (600, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-rc5-ao2 (SMP w/1 CPU core)
Locale: LANG=it_IT.utf8, LC_CTYPE=it_IT.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages nvidia-kernel-dkms depends on:
ii  dkms                          2.1.1.2-6  Dynamic Kernel Module Support Fram
ii  nvidia-kernel-common          20110426+1 NVIDIA binary kernel module suppor

Versions of packages nvidia-kernel-dkms recommends:
ii  nvidia-glx [nvidia-glx]       270.30-1   NVIDIA binary Xorg driver

nvidia-kernel-dkms suggests no packages.

Versions of packages nvidia-glx depends on:
ii  dpkg                         1.16.0.2    Debian package management system
ii  libc6                        2.11.2-13   Embedded GNU C Library: Shared lib
ii  libgl1-nvidia-glx [libgl1-nv 270.30-1    NVIDIA binary OpenGL libraries
ii  libglx-nvidia-alternatives   260.19.44-1 simplifies replacing Xorg module l
ii  nvidia-common                20110426+1  NVIDIA binary graphics driver supp
ii  nvidia-kernel-dkms [nvidia-k 270.30-1    NVIDIA binary kernel module DKMS s
ii  xserver-xorg-core [xorg-vide 2:1.9.5-1   Xorg X server - core server

Versions of packages nvidia-glx recommends:
ii  nvidia-vdpau-driver           270.30-1   NVIDIA vdpau driver

Versions of packages nvidia-glx suggests:
ii  nvidia-settings              195.36.24-1 Tool for configuring the NVIDIA gr

Versions of packages nvidia-kernel-source depends on:
ii  debhelper                     8.1.6      helper programs for debian/rules
ii  make                          3.81-8.1   An utility for Directing compilati
ii  quilt                         0.48-7     Tool to work with series of patche

Versions of packages nvidia-kernel-source recommends:
ii  kernel-package               12.036+nmu1 A utility for building Linux kerne
ii  module-assistant             0.11.3      tool to make module package creati
ii  nvidia-kernel-common         20110426+1  NVIDIA binary kernel module suppor

Versions of packages nvidia-kernel-source suggests:
ii  nvidia-glx [nvidia-glx]       270.30-1   NVIDIA binary Xorg driver

Versions of packages nvidia-kernel-dkms is related to:
ii  binutils              2.21.51.20110421-2 The GNU assembler, linker and bina
pn  binutils-gold         <none>             (no description available)
ii  linux-headers-2.6-amd 2.6.38+33          Header files for Linux 2.6-amd64 (
ii  linux-headers-2.6.38- 2.6.38-4           Header files for Linux 2.6.38-2-am
ii  linux-headers-2.6.38. 2.6.38.2-ao2-1     Linux kernel headers for 2.6.38.2-
ii  linux-headers-2.6.39- 2.6.39-rc5-ao2-1   Linux kernel headers for 2.6.39-rc
ii  nvidia-glx [nvidia-gl 270.30-1           NVIDIA binary Xorg driver
ii  nvidia-kernel-common  20110426+1         NVIDIA binary kernel module suppor
ii  nvidia-kernel-dkms [n 270.30-1           NVIDIA binary kernel module DKMS s
ii  nvidia-kernel-source  260.19.44-1        NVIDIA binary kernel module source
ii  xserver-xorg          1:7.6+6            the X.Org X server
ii  xserver-xorg-core     2:1.9.5-1          Xorg X server - core server

-- no debconf information
-------------- next part --------------
Make nvidia-kernel-dkms build on kernels >= 2.6.39-rc1

linux/smp_lock.h is not linux anymore. Since the code does not use 
kernel_locked() at all, the include can just be dropped.

Signed-off-by: Antonio Ospite <ospite at studenti.unina.it>

Index: source/nv-linux.h
===================================================================
--- source.orig/nv-linux.h	2011-03-17 07:39:06.000000000 +0100
+++ source/nv-linux.h	2011-03-30 11:57:27.000000000 +0200
@@ -89,7 +89,6 @@
 #if !defined(KERNEL_2_4)
 #include <linux/sched.h>            /* suser(), capable() replacement   */
 #include <linux/moduleparam.h>      /* module_param()                   */
-#include <linux/smp_lock.h>         /* kernel_locked                    */
 #include <asm/tlbflush.h>           /* flush_tlb(), flush_tlb_all()     */
 #include <asm/kmap_types.h>         /* page table entry lookup          */
 #endif


More information about the pkg-nvidia-devel mailing list