aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2021-06-23 05:10:20 +0000
committerAlan Cox <alc@FreeBSD.org>2021-06-23 19:22:46 +0000
commit62ea198e95f139e6b8041ec44f75d65aa26970d0 (patch)
treeba1f4d7e10d3f2ff255430445622497070880ca5
parentf13da24715a75ce0fdac31062866877d980aa908 (diff)
downloadsrc-62ea198e95f139e6b8041ec44f75d65aa26970d0.tar.gz
src-62ea198e95f139e6b8041ec44f75d65aa26970d0.zip
arm64: remove an unneeded test from pmap_clear_modify()
The page table entry for a 4KB page mapping must be valid if a PV entry for the mapping exists, so there is no point in testing each page table entry's validity when iterating over a PV list. Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30875
-rw-r--r--sys/arm64/arm64/pmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 5f321be98528..7def96bca70b 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -5664,8 +5664,7 @@ restart:
l2 = pmap_l2(pmap, pv->pv_va);
l3 = pmap_l2_to_l3(l2, pv->pv_va);
oldl3 = pmap_load(l3);
- if (pmap_l3_valid(oldl3) &&
- (oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == ATTR_SW_DBM){
+ if ((oldl3 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) == ATTR_SW_DBM){
pmap_set_bits(l3, ATTR_S1_AP(ATTR_S1_AP_RO));
pmap_invalidate_page(pmap, pv->pv_va);
}