Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/sys/uvm pullup 1.39->1.40 (thorpej): fix the 1G RAM bug



details:   https://anonhg.NetBSD.org/src/rev/0f130960b1c4
branches:  netbsd-1-4
changeset: 468715:0f130960b1c4
user:      perry <perry%NetBSD.org@localhost>
date:      Fri Jun 18 17:01:53 1999 +0000

description:
pullup 1.39->1.40 (thorpej): fix the 1G RAM bug

diffstat:

 sys/uvm/uvm_map.c |  27 +++++++++++++++++----------
 1 files changed, 17 insertions(+), 10 deletions(-)

diffs (51 lines):

diff -r 108e98886642 -r 0f130960b1c4 sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Fri Jun 18 16:58:56 1999 +0000
+++ b/sys/uvm/uvm_map.c Fri Jun 18 17:01:53 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.36.2.1 1999/04/19 16:02:52 perry Exp $   */
+/*     $NetBSD: uvm_map.c,v 1.36.2.2 1999/06/18 17:01:53 perry Exp $   */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -113,6 +113,17 @@
 
 struct pool uvm_map_entry_pool;
 
+#ifdef PMAP_GROWKERNEL
+/*
+ * This global represents the end of the kernel virtual address
+ * space.  If we want to exceed this, we must grow the kernel
+ * virtual address space dynamically.
+ *
+ * Note, this variable is locked by kernel_map's lock.
+ */
+vaddr_t uvm_maxkaddr;
+#endif
+
 /*
  * macros
  */
@@ -503,18 +514,14 @@
                return (KERN_NO_SPACE);
        }
 
-#if defined(PMAP_GROWKERNEL)   /* hack */
+#ifdef PMAP_GROWKERNEL
        {
-               /* locked by kernel_map lock */
-               static vaddr_t maxkaddr = 0;
-               
                /*
-                * hack: grow kernel PTPs in advance.
+                * If the kernel pmap can't map the requested space,
+                * then allocate more resources for it.
                 */
-               if (map == kernel_map && maxkaddr < (*startp + size)) {
-                       pmap_growkernel(*startp + size);
-                       maxkaddr = *startp + size;
-               }
+               if (map == kernel_map && uvm_maxkaddr < (*startp + size))
+                       uvm_maxkaddr = pmap_growkernel(*startp + size);
        }
 #endif
 



Home | Main Index | Thread Index | Old Index