HomeFreeBSD

pmap: Do not use PMAP_LOCK_INIT with kernel_pmap

Description

pmap: Do not use PMAP_LOCK_INIT with kernel_pmap

The kernel_pmap lock is a bit special: it does not need the DUPOK flag,
and it really belongs to a different lock class. If it belongs to the
same class as regular pmap locks, then witness may report warnings when
performing UMA allocations under a regular pmap lock, if the allocation
triggers a pmap_growkernel() call.

Replace instances of PMAP_LOCK_INIT(kernel_pmap) with inline mtx_init()
calls to silence some witness warnings for harmless behaviour I see with
some uncommitted test programs.

Reviewed by: alc, kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D56185

Details

Provenance
markjAuthored on Apr 1 2026, 9:15 AM
Reviewer
alc
Differential Revision
D56185: pmap: Do not use PMAP_LOCK_INIT with kernel_pmap
Parents
rGf3b59bf28504: bce: Fix SYSCTL_IN error check in bce_sysctl_nvram_write()
Branches
Unknown
Tags
Unknown