Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/arch/sparc/sparc Pull up revision 1.299 (requested by...
details: https://anonhg.NetBSD.org/src/rev/141f3fda8ce8
branches: netbsd-3
changeset: 576006:141f3fda8ce8
user: tron <tron%NetBSD.org@localhost>
date: Mon Jun 06 12:17:17 2005 +0000
description:
Pull up revision 1.299 (requested by chs in ticket #424):
in pmap_enter(), preset the mod/ref bits based on the flags argument.
fixes 25640.
diffstat:
sys/arch/sparc/sparc/pmap.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diffs (58 lines):
diff -r 2828c5dcba3d -r 141f3fda8ce8 sys/arch/sparc/sparc/pmap.c
--- a/sys/arch/sparc/sparc/pmap.c Mon Jun 06 12:17:03 2005 +0000
+++ b/sys/arch/sparc/sparc/pmap.c Mon Jun 06 12:17:17 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.297 2005/01/19 12:01:52 chs Exp $ */
+/* $NetBSD: pmap.c,v 1.297.6.1 2005/06/06 12:17:17 tron Exp $ */
/*
* Copyright (c) 1996
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.297 2005/01/19 12:01:52 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.297.6.1 2005/06/06 12:17:17 tron Exp $");
#include "opt_ddb.h"
#include "opt_kgdb.h"
@@ -5629,9 +5629,9 @@
#endif
pg = PHYS_TO_VM_PAGE(pa);
-
pteproto = PG_V | PMAP_T2PTE_4(pa);
pa &= ~PMAP_TNC_4;
+
/*
* Set up prototype for new PTE. Cannot set PG_NC from PV_NC yet
* since the pvlist no-cache bit might change as a result of the
@@ -5640,9 +5640,14 @@
pteproto |= atop(pa) & PG_PFNUM;
if (prot & VM_PROT_WRITE)
pteproto |= PG_W;
-
if ((flags & PMAP_WIRED) != 0)
pteproto |= PG_WIRED;
+ if (flags & VM_PROT_ALL) {
+ pteproto |= PG_U;
+ if (flags & VM_PROT_WRITE) {
+ pteproto |= PG_M;
+ }
+ }
write_user_windows();
ctx = getcontext4();
@@ -6266,6 +6271,12 @@
/* Make sure we get a pte with appropriate perms! */
pteproto |= pte_prot4m(pm, prot);
+ if (flags & VM_PROT_ALL) {
+ pteproto |= SRMMU_PG_R;
+ if (flags & VM_PROT_WRITE) {
+ pteproto |= SRMMU_PG_M;
+ }
+ }
if (pm == pmap_kernel())
error = pmap_enk4m(pm, va, prot, flags, pg, pteproto | PPROT_S);
Home |
Main Index |
Thread Index |
Old Index