CVSROOT:        /cvs
Module name:    src
Changes by:     gkoeh...@cvs.openbsd.org        2024/04/03 13:30:59

Modified files:
        sys/arch/powerpc/include: mplock.h 
        sys/arch/powerpc/powerpc: lock_machdep.c pmap.c 
        sys/arch/powerpc64/powerpc64: pmap.c 

Log message:
Initialize earlier macppc's and powerpc64's pmap_hash_lock

At boot, the powerpc64 kernel was calling
pmap_bootstrap -> pmap_kenter_pa -> mtx_enter(&pmap_hash_lock)
before it did
pmap_init -> mtx_init(&pmap_hash_lock, IPL_HIGH)

Change from mtx_init to MUTEX_INITIALIZER.  This allows an option
WITNESS kernel to boot without warning of an uninitialized mutex.

Also change macppc's pmap_hash_lock from __ppc_lock_init to
PPC_LOCK_INITIALIZER, though WITNESS doesn't see this lock.

ok mpi@

Reply via email to