git: cc67cd58fce0 - main - arm64: Support stage 2 mappings in pmap_remove_all

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Wed, 15 Mar 2023 18:34:45 UTC
The branch main has been updated by andrew:

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

commit cc67cd58fce07b7550f7be36508693f0e8e54926
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2023-03-15 16:27:51 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2023-03-15 18:24:50 +0000

    arm64: Support stage 2 mappings in pmap_remove_all
    
    This has been hit when testing bhyve.
    
    Sponsored by:   Arm Ltd
---
 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 2ea007418c9d..17abce473c17 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -3622,7 +3622,6 @@ retry:
 	}
 	while ((pv = TAILQ_FIRST(&m->md.pv_list)) != NULL) {
 		pmap = PV_PMAP(pv);
-		PMAP_ASSERT_STAGE1(pmap);
 		if (!PMAP_TRYLOCK(pmap)) {
 			pvh_gen = pvh->pv_gen;
 			md_gen = m->md.pv_gen;
@@ -3648,7 +3647,7 @@ retry:
 		if (tpte & ATTR_SW_WIRED)
 			pmap->pm_stats.wired_count--;
 		if ((tpte & ATTR_AF) != 0) {
-			pmap_s1_invalidate_page(pmap, pv->pv_va, true);
+			pmap_invalidate_page(pmap, pv->pv_va, true);
 			vm_page_aflag_set(m, PGA_REFERENCED);
 		}