* has anyone patched NVIDIA_kernel to work with 2.4.0?
@ 2001-01-11 8:06 dmeyer
2001-01-11 8:44 ` Paul Bristow
0 siblings, 1 reply; 3+ messages in thread
From: dmeyer @ 2001-01-11 8:06 UTC (permalink / raw)
To: linux-kernel
Between 2.4.0-test10 and 2.4.0 enough stuff changed that I can't get
the OpenGL NVIDIA_kernel module compiled and linked properly. Has
anyone else taken a shot at this?
I realize this is a little bit OT, since it's something that nvidia
ought to be handling, but thus far they've failed to respond to my
e-mail.
Thanks,
Dave
--
David M. Meyer
dmeyer@dmeyer.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: has anyone patched NVIDIA_kernel to work with 2.4.0?
2001-01-11 8:06 has anyone patched NVIDIA_kernel to work with 2.4.0? dmeyer
@ 2001-01-11 8:44 ` Paul Bristow
0 siblings, 0 replies; 3+ messages in thread
From: Paul Bristow @ 2001-01-11 8:44 UTC (permalink / raw)
To: dmeyer; +Cc: linux-kernel
On Thursday 11 January 2001 09:06, dmeyer@dmeyer.net wrote:
> Between 2.4.0-test10 and 2.4.0 enough stuff changed that I can't get
> the OpenGL NVIDIA_kernel module compiled and linked properly. Has
> anyone else taken a shot at this?
This was on linuxgames.com: does this not work? I haven't had time to try
yet...
Unofficial NVIDIA Driver 2.4.0 Patch - Friday Jan 05 08:58:54 2001 - Updated
by Crusader
phantomlord pointed out in our comments that the Christian "phoenix" Zander
has produced a patch for NVIDIA's Linux kernel driver for use in conjunction
with the recently released 2.4.0 kernel (phoenix wrote this code for the
2.4.0 prerelease, but the patch should work with the final kernel tree
without issues). Please note that this is an unofficial (and unsupported)
solution, and that NVIDIA will likely release a new official driver version
for use with the 2.4.x series shortly.
NVdriver Kernel Module Patch for Linux 2.4.0:
http://www.linuxgames.com/misc/patch-2.4.0-PR
--
Paul Bristow
http://paulbristow.net
ICQ#11965223
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: has anyone patched NVIDIA_kernel to work with 2.4.0?
@ 2001-01-11 8:46 Widmann Thomas
0 siblings, 0 replies; 3+ messages in thread
From: Widmann Thomas @ 2001-01-11 8:46 UTC (permalink / raw)
To: linux-kernel
Hi
* David Meyer wrote:
> Between 2.4.0-test10 and 2.4.0 enough stuff changed that I can't get
> the OpenGL NVIDIA_kernel module compiled and linked properly. Has
> anyone else taken a shot at this?
Try using this Patch. It compiles well on my 2.4.0 machine.
--- snipp ---
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 <linux/modversions.h>
#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 <nv.h> // needs to precede other headers (SMP)
#include <linux/stddef.h>
@@ -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;
--- snipp ---
Regards
Thomas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-01-11 8:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-11 8:06 has anyone patched NVIDIA_kernel to work with 2.4.0? dmeyer
2001-01-11 8:44 ` Paul Bristow
-- strict thread matches above, loose matches on Subject: below --
2001-01-11 8:46 Widmann Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox