[ATrpms-users] about the nvidia 100.14.19 drivers

Michael michael at kmaclub.com
Fri Nov 9 18:40:50 CET 2007


Axel Thimm wrote:
>
>
> Indeed, the 100.14.11 drivers don't build on F7's kernel anymore :(
>
> Maybe there are patches on the nvidia forums to enable the builds on
> kernels >= 2.6.23.
>   

Here is what I found in the forum:


To compile 100.14.09 on 2.6.23.x kernel, I made the following changes:

1. kmem_cache_create() in nv-linux.h would be one parameter less for 
2.6.23.x, take away one NULL at the end such that

#define NV_KMEM_CACHE_CREATE(kmem_cache, name, type) \
{ \
kmem_cache = kmem_cache_create(name, sizeof(type), \
0, 0, NULL); \
}

2. The 2 references to unregister_chrdev() in nv.c would return void in 
2.6.23.x.

Just take away the return code check and error message right after.


So here is my attempt at the patch.  This would be applicable to 2.6.23 
only.

diff -urN NVIDIA-Linux-x86_64-100.14.11-pkg0/usr/src/nv/nv.c 
NVIDIA-Linux-x86_64-100.14.11-pkg0.new/usr/src/nv/nv.c
--- NVIDIA-Linux-x86_64-100.14.11-pkg0/usr/src/nv/nv.c  2007-06-13 
17:18:38.000000000 -0700
+++ NVIDIA-Linux-x86_64-100.14.11-pkg0.new/usr/src/nv/nv.c      
2007-11-09 10:38:51.000000000 -0700
@@ -1566,9 +1566,6 @@
         if (apm_nv_dev[i] != NULL) pm_unregister(apm_nv_dev[i]);
 #endif

-    if (unregister_chrdev(nv_major, "nvidia") < 0)
-        nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
-
     for (i = 0; i < num_nv_devices; i++)
     {
         if (nv_linux_devices[i].dev)
@@ -1598,9 +1595,6 @@

     nv_printf(NV_DBG_INFO, "NVRM: nvidia_exit_module\n");

-    if (unregister_chrdev(nv_major, "nvidia") < 0)
-        nv_printf(NV_DBG_ERRORS, "NVRM: unregister nv chrdev failed\n");
-
     for (i = 0; i < num_nv_devices; i++)
     {
         struct pci_dev *dev;
diff -urN NVIDIA-Linux-x86_64-100.14.11-pkg0/usr/src/nv/nv-linux.h 
NVIDIA-Linux-x86_64-100.14.11-pkg0.new/usr/src/nv/nv-linux.h
--- NVIDIA-Linux-x86_64-100.14.11-pkg0/usr/src/nv/nv-linux.h    
2007-06-13 17:18:38.000000000 -0700
+++ NVIDIA-Linux-x86_64-100.14.11-pkg0.new/usr/src/nv/nv-linux.h        
2007-11-09 10:37:07.000000000 -0700
@@ -533,7 +533,7 @@
 #define NV_KMEM_CACHE_CREATE(kmem_cache, name, type)            \
     {                                                           \
         kmem_cache = kmem_cache_create(name, sizeof(type),      \
-                        0, 0, NULL, NULL);                      \
+                        0, 0, NULL);                            \
     }

 #define NV_KMEM_CACHE_DESTROY(kmem_cache)                       \




More information about the atrpms-users mailing list