public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "J . A . Magallon" <jamagallon@able.es>
To: Athanasius <Athanasius@miggy.org>
Cc: "J . A . Magallon" <jamagallon@able.es>,
	Linux Kernel List <linux-kernel@vger.kernel.org>
Subject: Re: Nvidia GeForce2 kernel driver - kernel 2.4.0 test-10
Date: Thu, 9 Nov 2000 11:09:20 +0100	[thread overview]
Message-ID: <20001109110920.A1423@werewolf.able.es> (raw)
In-Reply-To: <3A08F5E9.61F424A0@ihug.co.nz> <3A092269.9020501@edge.net> <20001109010848.A709@werewolf.able.es> <20001109075436.U17457@miggy.org>
In-Reply-To: <20001109075436.U17457@miggy.org>; from Athanasius@miggy.org on Thu, Nov 09, 2000 at 08:54:36 +0100

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]


On Thu, 09 Nov 2000 08:54:36 Athanasius wrote:
> 
>    Oh no it wasn't, doh *;-).

One other try...

-- 
Juan Antonio Magallon Lacarta                                 #> cd /pub
mailto:jamagallon@able.es                                     #> more beer

[-- Attachment #2: patch-nvdriver-2.4.0-test11 --]
[-- Type: application/octet-stream, Size: 1579 bytes --]

diff -ru 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	Thu Nov  9 00:23:42 2000
@@ -49,6 +49,13 @@
 #include <linux/modversions.h>
 #endif
 
+#ifndef mem_map_dec_count
+  #define mem_map_dec_count(p) atomic_inc(&((p)->count));
+#endif
+#ifndef mem_map_inc_count
+  #define mem_map_inc_count(p) atomic_dec(&((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 nvdriver_/os-interface.c
--- NVIDIA_kernel-0.9-5/os-interface.c	Fri Sep  1 04:19:17 2000
+++ nvdriver_/os-interface.c	Thu Nov  9 00:22:45 2000
@@ -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,17 @@
 
     *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;

      parent reply	other threads:[~2000-11-09 10:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-08  6:42 off topic a bit but i realy need help c++ and kernel david
2000-11-08  9:52 ` Nvidia GeForce2 kernel driver - kernel 2.4.0 test-10 Anthony Chatman
2000-11-09  0:08   ` J . A . Magallon
     [not found]     ` <20001109075436.U17457@miggy.org>
2000-11-09 10:09       ` J . A . Magallon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20001109110920.A1423@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=Athanasius@miggy.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox