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

Hi,

nvidia-260.19.21 source fails to build with 2.6.38-rc kernels, here is a
patch to fix that.

Thanks,
   Antonio Ospite
   http://ao2.it

-- Package-specific info:
uname -a:
Linux jcn 2.6.38-rc5-ao2 #1 SMP Wed Feb 16 15:32:02 CET 2011 x86_64 GNU/Linux

/proc/version:
Linux version 2.6.38-rc5-ao2 (ao2@jcn) (gcc version 4.4.5 (Debian 4.4.5-10) ) 
#1 SMP Wed Feb 16 15:32:02 CET 2011

/proc/driver/nvidia/version:
NVRM version: NVIDIA UNIX x86_64 Kernel Module  260.19.21  Thu Nov  4 21:16:27 
PDT 2010
GCC version:  gcc version 4.4.5 (Debian 4.4.5-10) 

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 21
        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


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

Kernel: Linux 2.6.38-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-5  Dynamic Kernel Module Support Fram
ii  nvidia-kernel-common          20100522+2 NVIDIA binary kernel module suppor

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

nvidia-kernel-dkms suggests no packages.

Versions of packages nvidia-glx depends on:
ii  dpkg                         1.15.8.10   Debian package management system
ii  libc6                        2.11.2-11   Embedded GNU C Library: Shared lib
ii  libgl1-nvidia-glx [libgl1-nv 260.19.21-1 NVIDIA binary OpenGL libraries
ii  libglx-nvidia-alternatives   260.19.21-1 simplifies replacing Xorg module l
ii  nvidia-kernel-dkms [nvidia-k 260.19.21-1 NVIDIA binary kernel module DKMS s
ii  xserver-xorg-core [xorg-vide 2:1.9.4-1   Xorg X server - core server

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

Versions of packages nvidia-kernel-dkms is related to:
ii  binutils                2.20.1-16        The GNU assembler, linker and bina
pn  binutils-gold           <none>           (no description available)
ii  linux-headers-2.6.32-5- 2.6.32-30        Header files for Linux 2.6.32-5-am
ii  linux-headers-2.6.38-rc 2.6.38-rc5-ao2-1 Linux kernel headers for 2.6.38-rc
ii  nvidia-glx [nvidia-glx] 260.19.21-1      NVIDIA binary Xorg driver
ii  nvidia-kernel-common    20100522+2       NVIDIA binary kernel module suppor
ii  nvidia-kernel-dkms [nvi 260.19.21-1      NVIDIA binary kernel module DKMS s
ii  nvidia-kernel-source    195.36.31-6      NVIDIA binary kernel module source
ii  xserver-xorg            1:7.6+3          the X.Org X server
ii  xserver-xorg-core       2:1.9.4-1        Xorg X server - core server

-- no debconf information
Index: nvidia-260.19.21/nv-linux.h
===================================================================
--- nvidia-260.19.21.orig/nv-linux.h	2010-11-21 04:04:51.000000000 +0100
+++ nvidia-260.19.21/nv-linux.h	2011-02-16 19:44:47.000000000 +0100
@@ -1029,8 +1029,13 @@
 #endif
 
 #if defined(NV_ACQUIRE_CONSOLE_SEM_PRESENT)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 37)
+#define NV_ACQUIRE_CONSOLE_SEM() console_lock()
+#define NV_RELEASE_CONSOLE_SEM() console_unlock()
+#else
 #define NV_ACQUIRE_CONSOLE_SEM() acquire_console_sem()
 #define NV_RELEASE_CONSOLE_SEM() release_console_sem()
+#endif
 #else
 #define NV_ACQUIRE_CONSOLE_SEM()
 #define NV_RELEASE_CONSOLE_SEM()
Index: nvidia-260.19.21/conftest.h
===================================================================
--- nvidia-260.19.21.orig/conftest.h	2011-02-16 19:45:02.000000000 +0100
+++ nvidia-260.19.21/conftest.h	2011-02-16 19:49:00.000000000 +0100
@@ -303,6 +303,13 @@
  #undef NV_LINUX_SEMAPHORE_H_PRESENT
 #endif
 
+/* Check for generated/autoconfig.h */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,37)
+ #define NV_GENERATED_AUTOCONF_H_PRESENT
+#else
+ #undef NV_GENERATED_AUTOCONF_H_PRESENT
+#endif
+
 /* Check for linux/cred.h */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
  #define NV_LINUX_CRED_H_PRESENT

Reply via email to