> From: Miod Vallat <m...@online.fr> > Date: Thu, 7 Jan 2021 11:51:02 -0000 (UTC) > > >> Indeed. Wrappinge the mutex operations in msgbuf_putchar with if (!cold) > >> makes the kernel boot again. > > > > Here is a diff for that. > > After a bit more thinking, it might be worth introduce a > msgbuf_putchar_unlocked() routine for the inner part only, and have > initmsgbuf() use it, since: > - it has made sure the magic value test will suceed. > - this is the only use of msgbuf_putchar() on sparc64 until the proper > curcpu mappings are set up; all output from pmap_bootstrap() carefully > uses the prom routines (and do not end up in the message buffer).
I was thinking the same thing.