Source-Changes-HG archive

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

[src/netbsd-3]: src/sys/arch/xen/i386 Pull up revision 1.12 (requested by chs...



details:   https://anonhg.NetBSD.org/src/rev/a86cb4971006
branches:  netbsd-3
changeset: 575999:a86cb4971006
user:      tron <tron%NetBSD.org@localhost>
date:      Mon Jun 06 12:16:10 2005 +0000

description:
Pull up revision 1.12 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.

diffstat:

 sys/arch/xen/i386/pmap.c |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (54 lines):

diff -r 4e35c825aebf -r a86cb4971006 sys/arch/xen/i386/pmap.c
--- a/sys/arch/xen/i386/pmap.c  Sat Jun 04 20:51:59 2005 +0000
+++ b/sys/arch/xen/i386/pmap.c  Mon Jun 06 12:16:10 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.8.2.2 2005/05/28 16:27:46 tron Exp $        */
+/*     $NetBSD: pmap.c,v 1.8.2.3 2005/06/06 12:16:10 tron Exp $        */
 /*     NetBSD: pmap.c,v 1.179 2004/10/10 09:55:24 yamt Exp             */
 
 /*
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.8.2.2 2005/05/28 16:27:46 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.8.2.3 2005/06/06 12:16:10 tron Exp $");
 
 #include "opt_cputype.h"
 #include "opt_user_ldt.h"
@@ -3670,6 +3670,11 @@
                npte |= (PG_u | PG_RW); /* XXXCDC: no longer needed? */
        if (pmap == pmap_kernel())
                npte |= pmap_pg_g;
+       if (flags & VM_PROT_ALL) {
+               npte |= PG_U;
+               if (flags & VM_PROT_WRITE)
+                       npte |= PG_M;
+       }
 
        /* get lock */
        PMAP_MAP_TO_HEAD_LOCK();
@@ -3932,6 +3937,11 @@
                npte |= (PG_u | PG_RW); /* XXXCDC: no longer needed? */
        if (pmap == pmap_kernel())
                npte |= pmap_pg_g;
+       if (flags & VM_PROT_ALL) {
+               npte |= PG_U;
+               if (flags & VM_PROT_WRITE)
+                       npte |= PG_M;
+       }
 
        /* get lock */
        PMAP_MAP_TO_HEAD_LOCK();
@@ -4161,6 +4171,11 @@
                npte |= (PG_u | PG_RW); /* XXXCDC: no longer needed? */
        if (pmap == pmap_kernel())
                npte |= pmap_pg_g;
+       if (flags & VM_PROT_ALL) {
+               npte |= PG_U;
+               if (flags & VM_PROT_WRITE)
+                       npte |= PG_M;
+       }
 
        /* get lock */
        PMAP_MAP_TO_HEAD_LOCK();



Home | Main Index | Thread Index | Old Index