From 7446769caf2ad278d89715072a34d1611a38b52e Mon Sep 17 00:00:00 2001 From: Jake Burkholder Date: Sun, 17 Nov 2002 01:17:07 +0000 Subject: [PATCH] MFi386 r1.369. Clear the PG_WRITEABLE flag in pmap_clear_write; return immediately if its already clear. Suggested by: alc --- sys/sparc64/sparc64/pmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/sparc64/sparc64/pmap.c b/sys/sparc64/sparc64/pmap.c index 219a0ccdf7e9..a05c787574c1 100644 --- a/sys/sparc64/sparc64/pmap.c +++ b/sys/sparc64/sparc64/pmap.c @@ -1822,7 +1822,8 @@ pmap_clear_write(vm_page_t m) { struct tte *tp; - if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0) + if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) != 0 || + (m->flags & PG_WRITEABLE) == 0) return; STAILQ_FOREACH(tp, &m->md.tte_list, tte_link) { if ((tp->tte_data & TD_PV) == 0) @@ -1836,6 +1837,7 @@ pmap_clear_write(vm_page_t m) tlb_page_demap(TTE_GET_PMAP(tp), TTE_GET_VA(tp)); } } + vm_page_flag_clear(m, PG_WRITEABLE); } int