git: b8cc13fa21df - main - riscv pmap: another vm_radix_init

From: Doug Moore <dougm_at_FreeBSD.org>
Date: Sun, 16 Jul 2023 20:51:30 UTC
The branch main has been updated by dougm:

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

commit b8cc13fa21df6081f11eb845e064ade37172195a
Author:     Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2023-07-16 20:48:43 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2023-07-16 20:48:43 +0000

    riscv pmap: another vm_radix_init
    
    pmap_pinit0 also needs to initialize a vm_radix, in case vm_radix_init
    does anything but zeroing fields.
    
    Reported by:    alc
    Reviewed by:    alc
    Differential Revision:  https://reviews.freebsd.org/D41055
---
 sys/riscv/riscv/pmap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c
index 6cada93cdc91..7580f091ad86 100644
--- a/sys/riscv/riscv/pmap.c
+++ b/sys/riscv/riscv/pmap.c
@@ -1327,6 +1327,7 @@ pmap_pinit0(pmap_t pmap)
 	pmap->pm_satp = pmap_satp_mode() |
 	    (vtophys(pmap->pm_top) >> PAGE_SHIFT);
 	CPU_ZERO(&pmap->pm_active);
+	vm_radix_init(&pmap->pm_root);
 	pmap_activate_boot(pmap);
 }