Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/vax Check page reference in pmap_clear_referenc...



details:   https://anonhg.NetBSD.org/src/rev/78a683312244
branches:  trunk
changeset: 503704:78a683312244
user:      ragge <ragge%NetBSD.org@localhost>
date:      Sun Feb 11 19:25:55 2001 +0000

description:
Check page reference in pmap_clear_reference(). Fixes vax hang problem
with ubc, tested by Chuck Silvers.

diffstat:

 sys/arch/vax/vax/pmap.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r f5e9ca7d7c14 -r 78a683312244 sys/arch/vax/vax/pmap.c
--- a/sys/arch/vax/vax/pmap.c   Sun Feb 11 19:03:47 2001 +0000
+++ b/sys/arch/vax/vax/pmap.c   Sun Feb 11 19:25:55 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.92 2000/12/31 11:16:55 ragge Exp $     */
+/*     $NetBSD: pmap.c,v 1.93 2001/02/11 19:25:55 ragge Exp $     */
 /*
  * Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -1105,6 +1105,7 @@
 {
        paddr_t pa = VM_PAGE_TO_PHYS(pg);
        struct  pv_entry *pv;
+       int ref = 0;
 
 #ifdef DEBUG
        if (IOSPACE(pa))
@@ -1116,6 +1117,9 @@
                printf("pmap_clear_reference: pa %lx pv_entry %p\n", pa, pv);
 #endif
 
+       if (pv->pv_attr & PG_V)
+               ref++;
+
        pv->pv_attr &= ~PG_V;
 
        RECURSESTART;
@@ -1132,7 +1136,7 @@
                    pv->pv_pte[6].pg_v = pv->pv_pte[7].pg_v = 0;
        RECURSEEND;
        mtpr(0, PR_TBIA);
-       return TRUE; /* XXX */
+       return ref;
 }
 
 /*



Home | Main Index | Thread Index | Old Index