Source-Changes-HG archive

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

[src/yamt-pagecache]: src/sys/arch/hppa/hppa adapt hp700. compile tested.



details:   https://anonhg.NetBSD.org/src/rev/2874b6713925
branches:  yamt-pagecache
changeset: 770845:2874b6713925
user:      yamt <yamt%NetBSD.org@localhost>
date:      Fri Dec 02 16:33:59 2011 +0000

description:
adapt hp700.  compile tested.

diffstat:

 sys/arch/hppa/hppa/pmap.c |  19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diffs (73 lines):

diff -r 4e4eac386d02 -r 2874b6713925 sys/arch/hppa/hppa/pmap.c
--- a/sys/arch/hppa/hppa/pmap.c Fri Dec 02 16:33:09 2011 +0000
+++ b/sys/arch/hppa/hppa/pmap.c Fri Dec 02 16:33:59 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.81 2011/06/12 03:35:41 rmind Exp $  */
+/*     $NetBSD: pmap.c,v 1.81.2.1 2011/12/02 16:33:59 yamt Exp $       */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.81 2011/06/12 03:35:41 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.81.2.1 2011/12/02 16:33:59 yamt Exp $");
 
 #include "opt_cputype.h"
 
@@ -76,6 +76,7 @@
 #include <sys/mutex.h>
 
 #include <uvm/uvm.h>
+#include <uvm/uvm_page_array.h>
 
 #include <machine/reg.h>
 #include <machine/psl.h>
@@ -393,7 +394,7 @@
                pmap_pde_set(pmap, va, 0);
                pmap->pm_stats.resident_count--;
                if (pmap->pm_ptphint == ptp)
-                       pmap->pm_ptphint = TAILQ_FIRST(&pmap->pm_obj.memq);
+                       pmap->pm_ptphint = NULL;
                ptp->wire_count = 0;
 
                KASSERT((ptp->flags & PG_BUSY) == 0);
@@ -1087,7 +1088,9 @@
 pmap_destroy(pmap_t pmap)
 {
 #ifdef DIAGNOSTIC
+       struct uvm_page_array a;
        struct vm_page *pg;
+       off_t off;
 #endif
        int refs;
 
@@ -1101,11 +1104,17 @@
                return;
 
 #ifdef DIAGNOSTIC
-       while ((pg = TAILQ_FIRST(&pmap->pm_obj.memq))) {
+       uvm_page_array_init(&a);
+       off = 0;
+       mutex_enter(pmap->pm_lock);
+       while ((pg = uvm_page_array_fill_and_peek(&a, &pmap->pm_obj, off, 0, 0))
+           != NULL) {
                pt_entry_t *pde, *epde;
                struct vm_page *sheep;
                struct pv_entry *haggis;
 
+               off = pg->offset + PAGE_SIZE;
+               uvm_page_array_advance(&a);
                if (pg == pmap->pm_pdir_pg)
                        continue;
 
@@ -1141,6 +1150,8 @@
                }
                DPRINTF(PDB_FOLLOW, ("\n"));
        }
+       mutex_exit(pmap->pm_lock);
+       uvm_page_array_fini(&a);
 #endif
        pmap_sdir_set(pmap->pm_space, 0);
        mutex_enter(pmap->pm_lock);



Home | Main Index | Thread Index | Old Index