Brian,
I attached the patch that I got from the nvidia IRC channel
at nvidia#irc.openprojects.net
I am using the nvidia kernel module with 2.4.test13-pre2
Give it a whirl,
Tony
> Hello all,
> I recently installed Linux on my pc and have been trying to get the
> NVidia drivers for my TNT2 (both kernel and OpenGL) to compile, but they
> will not with the my kernel. Does anyone have any ideas how I can
> compile the modules for my kernel or has anyone gotten this to work for
> them?
> TIA,
> Brian Kiefer
[
patch-nvdriver-2.4.0-test11-3 1K ]
diff -ru NVIDIA_kernel-0.9-5/nv.c ../projects/nvdriver_/nv.c
--- NVIDIA_kernel-0.9-5/nv.c Sat Aug 26 02:48:38 2000
#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>
diff -ru NVIDIA_kernel-0.9-5/os-interface.c ../projects/nvdriver_/os-interface.c
--- NVIDIA_kernel-0.9-5/os-interface.c Fri Sep 1 04:19:17 2000
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;
*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;