git: 90ba897b910a - main - Rename arm64 pmap bootstrap to not be dmap specific

From: Andrew Turner <andrew_at_FreeBSD.org>
Date: Tue, 27 Sep 2022 12:56:11 UTC
The branch main has been updated by andrew:

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

commit 90ba897b910ac098baad4fb02b58fc33bfdd1adc
Author:     Andrew Turner <andrew@FreeBSD.org>
AuthorDate: 2022-09-26 12:18:28 +0000
Commit:     Andrew Turner <andrew@FreeBSD.org>
CommitDate: 2022-09-27 12:26:29 +0000

    Rename arm64 pmap bootstrap to not be dmap specific
    
    This will be used by KASAN and possibly the kernel in general, rename
    so we aren't confused by it.
    
    Sponsored by:   The FreeBSD Foundation
---
 sys/arm64/arm64/pmap.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index 83eae8d5791f..bcb6e24cf4b3 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -817,7 +817,7 @@ pmap_early_vtophys(vm_offset_t va)
 }
 
 /* State of the bootstrapped DMAP page tables */
-struct dmap_bootstrap_state {
+struct pmap_bootstrap_state {
 	vm_offset_t	va;
 	vm_paddr_t	pa;
 	pt_entry_t	*l1;
@@ -830,7 +830,7 @@ struct dmap_bootstrap_state {
 };
 
 static void
-pmap_bootstrap_dmap_l0_table(struct dmap_bootstrap_state *state)
+pmap_bootstrap_l0_table(struct pmap_bootstrap_state *state)
 {
 	vm_paddr_t l1_pa;
 	u_int l0_slot;
@@ -863,13 +863,13 @@ pmap_bootstrap_dmap_l0_table(struct dmap_bootstrap_state *state)
 }
 
 static void
-pmap_bootstrap_dmap_l1_table(struct dmap_bootstrap_state *state)
+pmap_bootstrap_l1_table(struct pmap_bootstrap_state *state)
 {
 	vm_paddr_t l2_pa;
 	u_int l1_slot;
 
 	/* Make sure there is a valid L0 -> L1 table */
-	pmap_bootstrap_dmap_l0_table(state);
+	pmap_bootstrap_l0_table(state);
 
 	/* Link the level 1 table to a level 2 table */
 	l1_slot = pmap_l1_index(state->va);
@@ -897,13 +897,13 @@ pmap_bootstrap_dmap_l1_table(struct dmap_bootstrap_state *state)
 }
 
 static void
-pmap_bootstrap_dmap_l2_table(struct dmap_bootstrap_state *state)
+pmap_bootstrap_l2_table(struct pmap_bootstrap_state *state)
 {
 	vm_paddr_t l3_pa;
 	u_int l2_slot;
 
 	/* Make sure there is a valid L1 -> L2 table */
-	pmap_bootstrap_dmap_l1_table(state);
+	pmap_bootstrap_l1_table(state);
 
 	/* Link the level 2 table to a level 3 table */
 	l2_slot = pmap_l2_index(state->va);
@@ -927,7 +927,7 @@ pmap_bootstrap_dmap_l2_table(struct dmap_bootstrap_state *state)
 }
 
 static void
-pmap_bootstrap_dmap_l2_block(struct dmap_bootstrap_state *state, int i)
+pmap_bootstrap_l2_block(struct pmap_bootstrap_state *state, int i)
 {
 	u_int l2_slot;
 	bool first;
@@ -936,7 +936,7 @@ pmap_bootstrap_dmap_l2_block(struct dmap_bootstrap_state *state, int i)
 		return;
 
 	/* Make sure there is a valid L1 table */
-	pmap_bootstrap_dmap_l1_table(state);
+	pmap_bootstrap_l1_table(state);
 
 	MPASS((state->va & L2_OFFSET) == 0);
 	for (first = true;
@@ -962,7 +962,7 @@ pmap_bootstrap_dmap_l2_block(struct dmap_bootstrap_state *state, int i)
 }
 
 static void
-pmap_bootstrap_dmap_l3_page(struct dmap_bootstrap_state *state, int i)
+pmap_bootstrap_l3_page(struct pmap_bootstrap_state *state, int i)
 {
 	u_int l3_slot;
 	bool first;
@@ -971,7 +971,7 @@ pmap_bootstrap_dmap_l3_page(struct dmap_bootstrap_state *state, int i)
 		return;
 
 	/* Make sure there is a valid L2 table */
-	pmap_bootstrap_dmap_l2_table(state);
+	pmap_bootstrap_l2_table(state);
 
 	MPASS((state->va & L3_OFFSET) == 0);
 	for (first = true;
@@ -1000,7 +1000,7 @@ static vm_offset_t
 pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa,
     vm_offset_t freemempos)
 {
-	struct dmap_bootstrap_state state;
+	struct pmap_bootstrap_state state;
 	int i;
 
 	dmap_phys_base = min_pa & ~L1_OFFSET;
@@ -1019,13 +1019,13 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa,
 
 		/* Create L3 mappings at the start of the region */
 		if ((state.pa & L2_OFFSET) != 0)
-			pmap_bootstrap_dmap_l3_page(&state, i);
+			pmap_bootstrap_l3_page(&state, i);
 		MPASS(state.pa <= physmap[i + 1]);
 
 		if (L1_BLOCKS_SUPPORTED) {
 			/* Create L2 mappings at the start of the region */
 			if ((state.pa & L1_OFFSET) != 0)
-				pmap_bootstrap_dmap_l2_block(&state, i);
+				pmap_bootstrap_l2_block(&state, i);
 			MPASS(state.pa <= physmap[i + 1]);
 
 			/* Create the main L1 block mappings */
@@ -1033,7 +1033,7 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa,
 			    (physmap[i + 1] - state.pa) >= L1_SIZE;
 			    state.va += L1_SIZE, state.pa += L1_SIZE) {
 				/* Make sure there is a valid L1 table */
-				pmap_bootstrap_dmap_l0_table(&state);
+				pmap_bootstrap_l0_table(&state);
 				MPASS((state.pa & L1_OFFSET) == 0);
 				pmap_store(&state.l1[pmap_l1_index(state.va)],
 				    state.pa | ATTR_DEFAULT | ATTR_S1_XN |
@@ -1043,17 +1043,17 @@ pmap_bootstrap_dmap(vm_offset_t kern_l1, vm_paddr_t min_pa,
 			MPASS(state.pa <= physmap[i + 1]);
 
 			/* Create L2 mappings at the end of the region */
-			pmap_bootstrap_dmap_l2_block(&state, i);
+			pmap_bootstrap_l2_block(&state, i);
 		} else {
 			while (state.va < DMAP_MAX_ADDRESS &&
 			    (physmap[i + 1] - state.pa) >= L2_SIZE) {
-				pmap_bootstrap_dmap_l2_block(&state, i);
+				pmap_bootstrap_l2_block(&state, i);
 			}
 		}
 		MPASS(state.pa <= physmap[i + 1]);
 
 		/* Create L3 mappings at the end of the region */
-		pmap_bootstrap_dmap_l3_page(&state, i);
+		pmap_bootstrap_l3_page(&state, i);
 		MPASS(state.pa == physmap[i + 1]);
 
 		if (state.pa > dmap_phys_max) {