Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/i386/i386 pullup 1.24->1.25 (chuq)



details:   https://anonhg.NetBSD.org/src/rev/d37c4e2476a3
branches:  netbsd-1-4
changeset: 468654:d37c4e2476a3
user:      perry <perry%NetBSD.org@localhost>
date:      Wed May 05 17:05:44 1999 +0000

description:
pullup 1.24->1.25 (chuq)

diffstat:

 sys/arch/i386/i386/pmap.new.c |  32 ++++++++++++++++++++++++++++++--
 1 files changed, 30 insertions(+), 2 deletions(-)

diffs (75 lines):

diff -r 52fdedd2e993 -r d37c4e2476a3 sys/arch/i386/i386/pmap.new.c
--- a/sys/arch/i386/i386/pmap.new.c     Wed May 05 17:02:34 1999 +0000
+++ b/sys/arch/i386/i386/pmap.new.c     Wed May 05 17:05:44 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.new.c,v 1.23.2.1 1999/04/16 16:18:02 chs Exp $    */
+/*     $NetBSD: pmap.new.c,v 1.23.2.2 1999/05/05 17:05:44 perry Exp $  */
 
 /*
  *
@@ -627,7 +627,10 @@
 vsize_t len;
 
 {
+  struct pmap *pm = pmap_kernel();
   pt_entry_t *pte;
+  int s;
+
   len = len / NBPG;
 
   for ( /* null */ ; len ; len--, va += NBPG) {
@@ -646,6 +649,13 @@
       return;
     }
 
+    s = splimp();
+    simple_lock(&pm->pm_obj.vmobjlock);
+    pm->pm_stats.resident_count--;
+    pm->pm_stats.wired_count--;
+    simple_unlock(&pm->pm_obj.vmobjlock);
+    splx(s);
+
     *pte = 0;          /* zap! */
 #if defined(I386_CPU)
     if (cpu_class != CPUCLASS_386)
@@ -670,7 +680,17 @@
 vaddr_t va;
 
 {
+  struct pmap *pm = pmap_kernel();
   pt_entry_t *pte;
+  int s;
+
+  s = splimp();
+  simple_lock(&pm->pm_obj.vmobjlock);
+  pm->pm_stats.resident_count--;
+  pm->pm_stats.wired_count--;
+  simple_unlock(&pm->pm_obj.vmobjlock);
+  splx(s);
+
   pte = vtopte(va);
   *pte = 0;            /* zap! */
   pmap_update_pg(va);
@@ -687,13 +707,21 @@
 int npgs;
 
 {
+  struct pmap *pm = pmap_kernel();
   pt_entry_t *pte, opte;
-  int lcv;
+  int s, lcv;
   vaddr_t tva;
 #if defined(I386_CPU)
   boolean_t need_update = FALSE;
 #endif
 
+  s = splimp();
+  simple_lock(&pm->pm_obj.vmobjlock);
+  pm->pm_stats.resident_count += npgs;
+  pm->pm_stats.wired_count += npgs;
+  simple_unlock(&pm->pm_obj.vmobjlock);
+  splx(s);
+
   for (lcv = 0 ; lcv < npgs ; lcv++) {
     tva = va + lcv * NBPG;
     pte = vtopte(tva);



Home | Main Index | Thread Index | Old Index