Hat schon jemand versucht, die NVidia-Treiber (0.9.5) mit dem neuen
Kernel ans fliegen zu bekommen? Und villeicht sogar geschafft?
Ja, geht problemlos mit dem angehängten patch für den nvidia-treiber:
Hallo Marc,
patch -p1 < patch-2.4.0-pr
make clean
make
und feddisch
--
bye, Leo.
---
Some OS TELL what they can do - Linux DOES it...
________________________________________________
please visit my homepage at http://www.uni-jena.de/~i7lema
diff -ruN NVIDIA_kernel-0.9-5/nv.c nvdriver/nv.c
--- NVIDIA_kernel-0.9-5/nv.c Sat Aug 26 02:48:38 2000
+++ nvdriver/nv.c Tue Jan 2 13:43:13 2001
@@ -49,6 +49,13 @@
#include
#endif
+#ifndef mem_map_dec_count
+ #define mem_map_dec_count(p) atomic_dec(&((p)->count));
+#endif
+#ifndef mem_map_inc_count
+ #define mem_map_inc_count(p) atomic_inc(&((p)->count));
+#endif
+
#include // needs to precede other headers (SMP)
#include
@@ -778,17 +785,6 @@
}
-void nv_vma_release(struct vm_area_struct *vma)
-{
- nv_state_t *nv;
-
- nv = &nv_devices[NV_DEVICE_NUMBER(LINUX_VMA_DEV(vma))];
- NV_DMSG(nv, "vma_release [0x%lx-0x%lx]", vma->vm_start, vma->vm_end);
-
- MOD_DEC_USE_COUNT;
-}
-
-
// assumes we are destroying entire map
void nv_vma_unmap(
struct vm_area_struct *vma,
@@ -833,6 +829,21 @@
}
}
+
+void nv_vma_release(struct vm_area_struct *vma)
+{
+ nv_state_t *nv;
+
+ nv = &nv_devices[NV_DEVICE_NUMBER(LINUX_VMA_DEV(vma))];
+ NV_DMSG(nv, "vma_release [0x%lx-0x%lx]", vma->vm_start, vma->vm_end);
+
+ /* 2.4.0 PR fix/hack */
+ nv_vma_unmap(vma, vma->vm_start, vma->vm_end - vma->vm_start);
+
+ MOD_DEC_USE_COUNT;
+}
+
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 4, 0)
struct vm_operations_struct nv_vm_ops = {
nv_vma_open,
@@ -850,7 +861,8 @@
struct vm_operations_struct nv_vm_ops = {
open: nv_vma_open,
close: nv_vma_release,
- unmap: nv_vma_unmap,
+/* 2.4.0 PR hack/fix */
+/* unmap: nv_vma_unmap, */
};
#endif
diff -ruN NVIDIA_kernel-0.9-5/nv.h nvdriver/nv.h
--- NVIDIA_kernel-0.9-5/nv.h Sat Aug 26 02:48:38 2000
+++ nvdriver/nv.h Tue Jan 2 13:43:41 2001
@@ -128,7 +128,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
#define KERNEL_2_2
#else
- #warning This driver is not officially supported on post-2.2 kernels
+/* #warning This driver is not officially supported on post-2.2 kernels */
#define KERNEL_2_3
#endif // < 2.3
#endif // < 2.2
diff -ruN NVIDIA_kernel-0.9-5/os-interface.c nvdriver/os-interface.c
--- NVIDIA_kernel-0.9-5/os-interface.c Fri Sep 1 04:19:17 2000
+++ nvdriver/os-interface.c Tue Jan 2 13:41:14 2001
@@ -1331,6 +1331,11 @@
char *parmp;
char ch;
+ spinlock_t unload_lock = SPIN_LOCK_UNLOCKED;
+ struct module *mp = THIS_MODULE;
+ struct module_symbol *sym;
+ int i;
+
if ((strlen(regParmStr) + NV_SYM_PREFIX_LENGTH) > NV_MAX_SYM_NAME)
goto done;
@@ -1351,11 +1356,18 @@
*symp = '\0';
- symbol_value = get_module_symbol(NV_MODULE_NAME, symbol_name);
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
- put_module_symbol(symbol_value);
-#endif
+ spin_lock(&unload_lock);
+ if (MOD_CAN_QUERY(mp) && (mp->nsyms > 0)) {
+ for (i = mp->nsyms, sym = mp->syms;
+ i > 0; --i, ++sym) {
+
+ if (strcmp(sym->name, symbol_name) == 0) {
+ symbol_value = sym->value;
+ break;
+ }
+ }
+ }
+ spin_unlock(&unload_lock);
done:
return (void *) symbol_value;