diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2016-07-18 13:38:12 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2016-07-18 13:38:12 +0000 |
commit | 2d272525cf18fd7c920b5449bc65be4278c61ad9 (patch) | |
tree | 7c2f6598a2a0e5be219d7209de0037d54365a7c3 /sys | |
parent | 12be0a81b81969927b2c4c7062a769d03115a130 (diff) |
Don't need a separate flags variable in armv7 pmap_clean_page() -
just use the pv_flags. ('Twas a copy-paste from arm's pmap_clean_page(),
which did need it.)
Also remove even less used flags variable from pmap_page_remove().
First part from a diff from aalm@ - thanks
ok kettenis@ "looks good" patrick@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/arm/arm/pmap7.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sys/arch/arm/arm/pmap7.c b/sys/arch/arm/arm/pmap7.c index eea49fe955d..64a9ddbb002 100644 --- a/sys/arch/arm/arm/pmap7.c +++ b/sys/arch/arm/arm/pmap7.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap7.c,v 1.25 2016/06/07 06:23:19 dlg Exp $ */ +/* $OpenBSD: pmap7.c,v 1.26 2016/07/18 13:38:11 tom Exp $ */ /* $NetBSD: pmap.c,v 1.147 2004/01/18 13:03:50 scw Exp $ */ /* @@ -1071,7 +1071,6 @@ pmap_clean_page(struct vm_page *pg, int isync) pmap_t pm; struct pv_entry *pv; boolean_t wb = FALSE; - uint flags = 0; /* * To save time, we are only walking the pv list if an I$ invalidation @@ -1088,8 +1087,6 @@ pmap_clean_page(struct vm_page *pg, int isync) if (pv->pv_pmap != pmap_kernel() && pv->pv_pmap != pm) continue; - flags |= pv->pv_flags; - /* * The page is mapped non-cacheable in * this map. No need to flush the cache. @@ -1097,7 +1094,7 @@ pmap_clean_page(struct vm_page *pg, int isync) if (pv->pv_flags & PVF_NC) /* XXX ought to be pg attr */ break; - if (PV_BEEN_EXECD(flags)) + if (PV_BEEN_EXECD(pv->pv_flags)) cpu_icache_sync_range(pv->pv_va, PAGE_SIZE); /* @@ -1144,7 +1141,6 @@ pmap_page_remove(struct vm_page *pg) pmap_t pm, curpm; pt_entry_t *ptep, pte; boolean_t flush; - u_int flags; NPDEBUG(PDB_FOLLOW, printf("pmap_page_remove: pg %p (0x%08lx)\n", pg, pg->phys_addr)); @@ -1154,7 +1150,6 @@ pmap_page_remove(struct vm_page *pg) return; flush = FALSE; - flags = 0; if (curproc) curpm = curproc->p_vmspace->vm_map.pmap; else @@ -1195,8 +1190,6 @@ pmap_page_remove(struct vm_page *pg) if (pv->pv_flags & PVF_WIRED) --pm->pm_stats.wired_count; - flags |= pv->pv_flags; - /* * Invalidate the PTEs. */ |