aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlan Cox <alc@FreeBSD.org>2021-07-07 18:16:03 +0000
committerAlan Cox <alc@FreeBSD.org>2021-07-07 18:34:11 +0000
commit0add3c9945c85c7f766f9225866e99e2a805819b (patch)
tree9f8d14ff2fdd452208370d948a6f667ec6bad63d /sys
parent48b4fe0503282f03d25e23f44109c5cb6d450f7c (diff)
downloadsrc-0add3c9945c85c7f766f9225866e99e2a805819b.tar.gz
src-0add3c9945c85c7f766f9225866e99e2a805819b.zip
arm64: Simplify fcmpset failure in pmap_promote_l2()
When the initial fcmpset in pmap_promote_l2() fails, there is no need to repeat the check for the physical address being 2MB aligned or for the accessed bit being set. While the pmap is locked the hardware can only transition the accessed bit from 0 to 1, and we have already determined that it is 1 when the fcmpset fails. MFC after: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/arm64/arm64/pmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index bf476490b6be..7758a84d81d5 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -3502,7 +3502,6 @@ pmap_promote_l2(pmap_t pmap, pd_entry_t *l2, vm_offset_t va,
firstl3 = pmap_l2_to_l3(l2, sva);
newl2 = pmap_load(firstl3);
-setl2:
if (((newl2 & (~ATTR_MASK | ATTR_AF)) & L2_OFFSET) != ATTR_AF) {
atomic_add_long(&pmap_l2_p_failures, 1);
CTR2(KTR_PMAP, "pmap_promote_l2: failure for va %#lx"
@@ -3510,6 +3509,7 @@ setl2:
return;
}
+setl2:
if ((newl2 & (ATTR_S1_AP_RW_BIT | ATTR_SW_DBM)) ==
(ATTR_S1_AP(ATTR_S1_AP_RO) | ATTR_SW_DBM)) {
/*