Gate low level console output on mtx_lock_spin(&sio_lock), if the

sio_lock has been initialized.  This prevents the low level console
output (kernel printf) from clobbering the sio settings if the system
happens to be in the middle of comstart().
This commit is contained in:
Jonathan Lemon 2001-09-27 17:00:25 +00:00
parent 04d4d7cf05
commit 3a163803b7
2 changed files with 8 additions and 0 deletions

View File

@ -3335,10 +3335,14 @@ siocnputc(dev, c)
else
iobase = siocniobase;
s = spltty();
if (sio_inited)
mtx_lock_spin(&sio_lock);
siocnopen(&sp, iobase, comdefaultrate);
siocntxwait(iobase);
outb(iobase + com_data, c);
siocnclose(&sp, iobase);
if (sio_inited)
mtx_unlock_spin(&sio_lock);
splx(s);
}

View File

@ -3335,10 +3335,14 @@ siocnputc(dev, c)
else
iobase = siocniobase;
s = spltty();
if (sio_inited)
mtx_lock_spin(&sio_lock);
siocnopen(&sp, iobase, comdefaultrate);
siocntxwait(iobase);
outb(iobase + com_data, c);
siocnclose(&sp, iobase);
if (sio_inited)
mtx_unlock_spin(&sio_lock);
splx(s);
}