1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00

- Make the sio_inited handling more properly MP safe.

- If we are booting with a serial console, then pass the MTX_QUIET flag to
  mtx_init of the sio lock as otherwise KTR_VERBOSE simply doesn't work.
This commit is contained in:
John Baldwin 2001-10-20 03:32:33 +00:00
parent dee2bb2540
commit 76e296aa31
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85209
2 changed files with 12 additions and 4 deletions

View File

@ -778,8 +778,12 @@ sioprobe(dev, xrid)
com->bst = rman_get_bustag(port);
com->bsh = rman_get_bushandle(port);
if (atomic_cmpset_int(&sio_inited, 0, 1))
mtx_init(&sio_lock, driver_name, MTX_SPIN);
while (sio_inited != 2)
if (atomic_cmpset_int(&sio_inited, 0, 1)) {
mtx_init(&sio_lock, driver_name, (comconsole != -1) ?
MTX_SPIN | MTX_QUIET : MTX_SPIN);
atomic_store_rel_int(&sio_inited, 2);
}
#if 0
/*

View File

@ -778,8 +778,12 @@ sioprobe(dev, xrid)
com->bst = rman_get_bustag(port);
com->bsh = rman_get_bushandle(port);
if (atomic_cmpset_int(&sio_inited, 0, 1))
mtx_init(&sio_lock, driver_name, MTX_SPIN);
while (sio_inited != 2)
if (atomic_cmpset_int(&sio_inited, 0, 1)) {
mtx_init(&sio_lock, driver_name, (comconsole != -1) ?
MTX_SPIN | MTX_QUIET : MTX_SPIN);
atomic_store_rel_int(&sio_inited, 2);
}
#if 0
/*