git: 52d50956b826 - stable/13 - arm64: remove an unneeded test from pmap_clear_modify()

Mark Johnston markj at FreeBSD.org
Tue Aug 31 19:09:42 UTC 2021


The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=52d50956b826d602b2fcf5d97cd587d4d0ded942

commit 52d50956b826d602b2fcf5d97cd587d4d0ded942
Author:     Alan Cox <alc at FreeBSD.org>
AuthorDate: 2021-06-23 05:10:20 +0000
Commit:     Mark Johnston <markj at FreeBSD.org>
CommitDate: 2021-08-31 19:09:22 +0000

    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
    
    (cherry picked from commit 62ea198e95f139e6b8041ec44f75d65aa26970d0)
---
 sys/arm64/arm64/pmap.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 8670056e81f5..0df53a60bcea 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -5873,8 +5873,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);
 		}


More information about the dev-commits-src-branches mailing list