From 1d9d2c47c5db0a1dfc0a4b534422eea737d200eb Mon Sep 17 00:00:00 2001 From: mycroft Date: Sat, 27 Nov 1999 00:25:15 +0000 Subject: [PATCH] In pmap_emulate_reference(), always or in the bits. I know the code is trying to be clever, but... Also, a slight optimization for the write case. --- sys/arch/alpha/alpha/pmap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index d512b66d865d..e55854fa9b27 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.116 1999/11/26 23:04:33 mycroft Exp $ */ +/* $NetBSD: pmap.c,v 1.117 1999/11/27 00:25:15 mycroft Exp $ */ /*- * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc. @@ -154,7 +154,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.116 1999/11/26 23:04:33 mycroft Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.117 1999/11/27 00:25:15 mycroft Exp $"); #include #include @@ -2809,11 +2809,12 @@ pmap_emulate_reference(p, v, user, write) PMAP_HEAD_TO_MAP_LOCK(); simple_lock(&pvh->pvh_slock); - pvh->pvh_attrs = PGA_REFERENCED; - faultoff = PG_FOR | PG_FOE; if (write) { - pvh->pvh_attrs |= PGA_MODIFIED; - faultoff |= PG_FOW; + pvh->pvh_attrs |= (PGA_REFERENCED|PGA_MODIFIED); + faultoff = PG_FOR | PG_FOW | PG_FOE; + } else { + pvh->pvh_attrs |= PGA_REFERENCED; + faultoff = PG_FOR | PG_FOE; } pmap_changebit(pa, 0, ~faultoff, cpu_id);