Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm26/arm26 Don't update referenced/modified bits i...



details:   https://anonhg.NetBSD.org/src/rev/8cd55b9013c4
branches:  trunk
changeset: 516008:8cd55b9013c4
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sat Oct 13 14:23:31 2001 +0000

description:
Don't update referenced/modified bits if a page is entered using
pmap_kenter_pa.  pmap(9) says unmanage mappings don't get referenced/modified
tracking, and this seems to stop me getting a panic while starting up with
root on NFS.

diffstat:

 sys/arch/arm26/arm26/pmap.c |  15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diffs (36 lines):

diff -r b9d1c7b8e579 -r 8cd55b9013c4 sys/arch/arm26/arm26/pmap.c
--- a/sys/arch/arm26/arm26/pmap.c       Sat Oct 13 14:22:11 2001 +0000
+++ b/sys/arch/arm26/arm26/pmap.c       Sat Oct 13 14:23:31 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.32 2001/09/10 21:19:33 chris Exp $ */
+/* $NetBSD: pmap.c,v 1.33 2001/10/13 14:23:31 bjh21 Exp $ */
 /*-
  * Copyright (c) 1997, 1998, 2000 Ben Harris
  * All rights reserved.
@@ -105,7 +105,7 @@
 
 #include <sys/param.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.32 2001/09/10 21:19:33 chris Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.33 2001/10/13 14:23:31 bjh21 Exp $");
 
 #include <sys/kernel.h> /* for cold */
 #include <sys/malloc.h>
@@ -679,10 +679,13 @@
        }
        if (unmanaged)
                pv->pv_vflags |= PV_UNMANAGED;
-       if (flags & VM_PROT_WRITE)
-               ppv->pv_pflags |= PV_REFERENCED | PV_MODIFIED;
-       else if (flags & (VM_PROT_ALL))
-               ppv->pv_pflags |= PV_REFERENCED;
+       else {
+               /* According to pmap(9), unmanaged mappings don't track r/m */
+               if (flags & VM_PROT_WRITE)
+                       ppv->pv_pflags |= PV_REFERENCED | PV_MODIFIED;
+               else if (flags & (VM_PROT_ALL))
+                       ppv->pv_pflags |= PV_REFERENCED;
+       }
        pmap_update_page(ppn);
        pmap->pm_entries[lpn] = pv;
        if (pv->pv_vflags & PV_WIRED)



Home | Main Index | Thread Index | Old Index