The branch main has been updated by markj:

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

commit ff93447d8ed61081adfe00a23a1e4c7bee479e53
Author:     Mark Johnston <ma...@freebsd.org>
AuthorDate: 2021-10-20 00:29:05 +0000
Commit:     Mark Johnston <ma...@freebsd.org>
CommitDate: 2021-10-20 01:22:56 +0000

    Use the vm_radix_init() helper when initializing pmaps
    
    No functional change intended.
    
    Reviewed by:    alc, kib
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D32527
---
 sys/amd64/amd64/pmap.c       | 4 ++--
 sys/arm64/arm64/pmap.c       | 4 ++--
 sys/arm64/iommu/iommu_pmap.c | 2 +-
 sys/i386/i386/pmap.c         | 4 ++--
 sys/powerpc/aim/mmu_radix.c  | 4 ++--
 5 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index f8bb384afdaf..8d6379ab170c 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -4177,7 +4177,7 @@ pmap_pinit0(pmap_t pmap)
        pmap->pm_cr3 = kernel_pmap->pm_cr3;
        /* hack to keep pmap_pti_pcid_invalidate() alive */
        pmap->pm_ucr3 = PMAP_NO_CR3;
-       pmap->pm_root.rt_root = 0;
+       vm_radix_init(&pmap->pm_root);
        CPU_ZERO(&pmap->pm_active);
        TAILQ_INIT(&pmap->pm_pvchunk);
        bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
@@ -4398,7 +4398,7 @@ pmap_pinit_type(pmap_t pmap, enum pmap_type pm_type, int 
flags)
                break;
        }
 
-       pmap->pm_root.rt_root = 0;
+       vm_radix_init(&pmap->pm_root);
        CPU_ZERO(&pmap->pm_active);
        TAILQ_INIT(&pmap->pm_pvchunk);
        bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index ab62ca2934f0..cd499e026036 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -1748,7 +1748,7 @@ pmap_pinit0(pmap_t pmap)
        bzero(&pmap->pm_stats, sizeof(pmap->pm_stats));
        pmap->pm_l0_paddr = READ_SPECIALREG(ttbr0_el1);
        pmap->pm_l0 = (pd_entry_t *)PHYS_TO_DMAP(pmap->pm_l0_paddr);
-       pmap->pm_root.rt_root = 0;
+       vm_radix_init(&pmap->pm_root);
        pmap->pm_cookie = COOKIE_FROM(ASID_RESERVED_FOR_PID_0, INT_MIN);
        pmap->pm_stage = PM_STAGE1;
        pmap->pm_levels = 4;
@@ -1771,7 +1771,7 @@ pmap_pinit_stage(pmap_t pmap, enum pmap_stage stage, int 
levels)
        pmap->pm_l0_paddr = VM_PAGE_TO_PHYS(m);
        pmap->pm_l0 = (pd_entry_t *)PHYS_TO_DMAP(pmap->pm_l0_paddr);
 
-       pmap->pm_root.rt_root = 0;
+       vm_radix_init(&pmap->pm_root);
        bzero(&pmap->pm_stats, sizeof(pmap->pm_stats));
        pmap->pm_cookie = COOKIE_FROM(-1, INT_MAX);
 
diff --git a/sys/arm64/iommu/iommu_pmap.c b/sys/arm64/iommu/iommu_pmap.c
index 7ea8a7ee93a3..0f7b9ba24b0a 100644
--- a/sys/arm64/iommu/iommu_pmap.c
+++ b/sys/arm64/iommu/iommu_pmap.c
@@ -392,7 +392,7 @@ iommu_pmap_pinit_levels(pmap_t pmap, int levels)
        pmap->pm_l0_paddr = VM_PAGE_TO_PHYS(m);
        pmap->pm_l0 = (pd_entry_t *)PHYS_TO_DMAP(pmap->pm_l0_paddr);
 
-       pmap->pm_root.rt_root = 0;
+       vm_radix_init(&pmap->pm_root);
        bzero(&pmap->pm_stats, sizeof(pmap->pm_stats));
 
        MPASS(levels == 3 || levels == 4);
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 62fcbcd90b0b..3b8e335701d2 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -2043,7 +2043,7 @@ __CONCAT(PMTYPE, pinit0)(pmap_t pmap)
 #ifdef PMAP_PAE_COMP
        pmap->pm_pdpt = IdlePDPT;
 #endif
-       pmap->pm_root.rt_root = 0;
+       vm_radix_init(&pmap->pm_root);
        CPU_ZERO(&pmap->pm_active);
        TAILQ_INIT(&pmap->pm_pvchunk);
        bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
@@ -2075,7 +2075,7 @@ __CONCAT(PMTYPE, pinit)(pmap_t pmap)
                KASSERT(pmap_kextract((vm_offset_t)pmap->pm_pdpt) < (4ULL<<30),
                    ("pmap_pinit: pdpt above 4g"));
 #endif
-               pmap->pm_root.rt_root = 0;
+               vm_radix_init(&pmap->pm_root);
        }
        KASSERT(vm_radix_is_empty(&pmap->pm_root),
            ("pmap_pinit: pmap has reserved page table page(s)"));
diff --git a/sys/powerpc/aim/mmu_radix.c b/sys/powerpc/aim/mmu_radix.c
index 95c3f5f009e4..420a7a227c10 100644
--- a/sys/powerpc/aim/mmu_radix.c
+++ b/sys/powerpc/aim/mmu_radix.c
@@ -4202,7 +4202,7 @@ mmu_radix_pinit(pmap_t pmap)
 
        for (int j = 0; j <  RADIX_PGD_SIZE_SHIFT; j++)
                pagezero((vm_offset_t)pmap->pm_pml1 + j * PAGE_SIZE);
-       pmap->pm_radix.rt_root = 0;
+       vm_radix_init(&pmap->pm_radix);
        TAILQ_INIT(&pmap->pm_pvchunk);
        bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
        pmap->pm_flags = PMAP_PDE_SUPERPAGE;
@@ -4433,7 +4433,7 @@ mmu_radix_pinit0(pmap_t pmap)
        pmap->pm_pml1 = kernel_pmap->pm_pml1;
        pmap->pm_pid = kernel_pmap->pm_pid;
 
-       pmap->pm_radix.rt_root = 0;
+       vm_radix_init(&pmap->pm_radix);
        TAILQ_INIT(&pmap->pm_pvchunk);
        bzero(&pmap->pm_stats, sizeof pmap->pm_stats);
        kernel_pmap->pm_flags =

Reply via email to