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
This commit is contained in:
parent
a9d6f1fe0a
commit
ff93447d8e
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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)"));
|
||||
|
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user