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 if page to be remapped in pmap_enter(...



details:   https://anonhg.NetBSD.org/src/rev/4b7efe5ca439
branches:  trunk
changeset: 515641:4b7efe5ca439
user:      ragge <ragge%NetBSD.org@localhost>
date:      Sun Sep 30 17:12:08 2001 +0000

description:
Check if page to be remapped in pmap_enter() is entered by pmap_kenter_pa(),
to decide whether to remove the previous mapping from pv_table or not.
Should fix PR#12231.

diffstat:

 sys/arch/vax/vax/pmap.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (24 lines):

diff -r 3898a725b845 -r 4b7efe5ca439 sys/arch/vax/vax/pmap.c
--- a/sys/arch/vax/vax/pmap.c   Sun Sep 30 16:04:03 2001 +0000
+++ b/sys/arch/vax/vax/pmap.c   Sun Sep 30 17:12:08 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.107 2001/09/24 01:48:16 chs Exp $      */
+/*     $NetBSD: pmap.c,v 1.108 2001/09/30 17:12:08 ragge Exp $    */
 /*
  * Copyright (c) 1994, 1998, 1999 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -842,10 +842,11 @@
                 * Mapped before? Remove it then.
                 */
 
-               oldpte &= PG_FRAME;
-               if (oldpte) {
+               if (oldpte & PG_FRAME) {
                        RECURSEEND;
-                       rensa(oldpte >> LTOHPS, (struct pte *)&patch[i]);
+                       if ((oldpte & PG_SREF) == 0)
+                               rensa((oldpte & PG_FRAME) >> LTOHPS,
+                                   (struct pte *)&patch[i]);
                        RECURSESTART;
                } else if (pmap != pmap_kernel())
                                pmap->pm_refcnt[index]++; /* New mapping */



Home | Main Index | Thread Index | Old Index