From fc47434cee33038daf2d62413ca2ffd212e8616a Mon Sep 17 00:00:00 2001
From: dt
Date: Sat, 9 Jan 1999 21:41:22 +0000
Subject: Oops --<, replace 1.216 with a version that actually check pv_entries
(and was tested for month or two in production).
Noticed by: Stephen McKay
Stephen also suggested to remove the complication at all. I don't do it as
it would be backout of a large part of 1.190 (from 1998/03/16)...
---
sys/amd64/amd64/pmap.c | 8 +++++---
sys/i386/i386/pmap.c | 8 +++++---
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 92c3d2e..3a4e19e 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.216 1999/01/07 22:15:51 dt Exp $
+ * $Id: pmap.c,v 1.217 1999/01/08 14:20:54 luoqi Exp $
*/
/*
@@ -3227,8 +3227,10 @@ pmap_ts_referenced(vm_offset_t pa)
/*
* Not found, check current mappings returning immediately if found.
*/
- pvf = TAILQ_FIRST(&ppv->pv_list);
- for (pv = pvf; pv && pv != pvf; pv = pvn) {
+ pvf = 0;
+ for (pv = TAILQ_FIRST(&ppv->pv_list); pv && pv != pvf; pv = pvn) {
+ if (!pvf)
+ pvf = pv;
pvn = TAILQ_NEXT(pv, pv_list);
TAILQ_REMOVE(&ppv->pv_list, pv, pv_list);
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 92c3d2e..3a4e19e 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* from: @(#)pmap.c 7.7 (Berkeley) 5/12/91
- * $Id: pmap.c,v 1.216 1999/01/07 22:15:51 dt Exp $
+ * $Id: pmap.c,v 1.217 1999/01/08 14:20:54 luoqi Exp $
*/
/*
@@ -3227,8 +3227,10 @@ pmap_ts_referenced(vm_offset_t pa)
/*
* Not found, check current mappings returning immediately if found.
*/
- pvf = TAILQ_FIRST(&ppv->pv_list);
- for (pv = pvf; pv && pv != pvf; pv = pvn) {
+ pvf = 0;
+ for (pv = TAILQ_FIRST(&ppv->pv_list); pv && pv != pvf; pv = pvn) {
+ if (!pvf)
+ pvf = pv;
pvn = TAILQ_NEXT(pv, pv_list);
TAILQ_REMOVE(&ppv->pv_list, pv, pv_list);
--
cgit v1.1