Initialize earlier macppc's and powerpc64's pmap_hash_lock
authorgkoehler <gkoehler@openbsd.org>
Wed, 3 Apr 2024 19:30:59 +0000 (19:30 +0000)
committergkoehler <gkoehler@openbsd.org>
Wed, 3 Apr 2024 19:30:59 +0000 (19:30 +0000)
commit1c6319c482fd15de41f69f61b08fa1b926df6e1a
treed79bdb89cfc393f1dc7d96af67f8665e59200a43
parent67e981396d70d32ae0d9d2c6631d4bca92c17d49
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@
sys/arch/powerpc/include/mplock.h
sys/arch/powerpc/powerpc/lock_machdep.c
sys/arch/powerpc/powerpc/pmap.c
sys/arch/powerpc64/powerpc64/pmap.c