lkml.org 
[lkml]   [2002]   [May]   [4]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateSat, 4 May 2002 15:49:43 +0200
FromAndrea Arcangeli <>
SubjectRe: 2.4.19pre8aa1 & vm-34: unresolved kmap_pagetable
On Sat, May 04, 2002 at 11:41:25PM +1000, Eyal Lebedinsky wrote:
> Well, this may be a problem for NVdriver (a mostly binary only driver)
> which I use.

This should fix it:

diff -urN NVIDIA_kernel-1.0-2313/nv.c NVIDIA_kernel-1.0-2313.pte-highmem/nv.c
--- NVIDIA_kernel-1.0-2313/nv.c	Tue Nov 27 21:39:17 2001
+++ NVIDIA_kernel-1.0-2313.pte-highmem/nv.c	Sun Feb  3 16:35:18 2002
@@ -42,6 +42,7 @@
 #include <linux/interrupt.h>           
 #include <linux/tqueue.h>               // struct tq_struct 
 #include <linux/poll.h>
+#include <linux/highmem.h>
 #ifdef CONFIG_PM
 #include <linux/pm.h>                   // power management
 #endif
@@ -2267,7 +2268,7 @@
 {
     pgd_t *pg_dir;
     pmd_t *pg_mid_dir;
-    pte_t *pg_table;
+    pte_t *pg_table, pte;
 
     /* XXX do we really need this? */
     if (address > VMALLOC_START)
@@ -2297,11 +2298,13 @@
     if (pmd_none(*pg_mid_dir))
         goto failed;
 
-    pg_table = pte_offset(pg_mid_dir, address);
-    if (!pte_present(*pg_table))
+    pg_table = pte_offset_atomic(pg_mid_dir, address);
+    pte = *pg_table;
+    pte_kunmap(pg_table);
+    if (!pte_present(pte))
         goto failed;
 
-    return ((pte_val(*pg_table) & KERN_PAGE_MASK) | NV_MASK_OFFSET(address));
+    return ((pte_val(pte) & KERN_PAGE_MASK) | NV_MASK_OFFSET(address));
 
   failed:
     return (unsigned long) NULL;
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:25    [from the cache]
©2003-2008