PERFORCE change 91260 for review
John Baldwin
jhb at FreeBSD.org
Mon Feb 6 13:40:29 PST 2006
http://perforce.freebsd.org/chv.cgi?CH=91260
Change 91260 by jhb at jhb_slimer on 2006/02/06 21:40:00
Save this here until someone tests it. Change the hptmv driver to
use a regular mutex since it doesn't use an INTR_FAST handler, thus
using a spin mutex just adds extra cost with no benefit.
Affected files ...
.. //depot/projects/smpng/sys/dev/hptmv/entry.c#9 edit
Differences ...
==== //depot/projects/smpng/sys/dev/hptmv/entry.c#9 (text+ko) ====
@@ -167,12 +167,12 @@
{
intrmask_t spl = 0;
- mtx_lock_spin(&driver_lock);
+ mtx_lock(&driver_lock);
return spl;
}
void unlock_driver(intrmask_t spl)
{
- mtx_unlock_spin(&driver_lock);
+ mtx_unlock(&driver_lock);
}
#else
static int driver_locked = 0;
@@ -1169,9 +1169,10 @@
#if __FreeBSD_version >= 500000
static void hpt_init(void *dummy)
{
- mtx_init(&driver_lock, "hptlock", NULL, MTX_SPIN);
+ mtx_init(&driver_lock, "hptlock", NULL, MTX_DEF);
}
SYSINIT(hptinit, SI_SUB_CONFIGURE, SI_ORDER_FIRST, hpt_init, NULL);
+SYSUNINIT(hptinit, SI_SUB_CONFIGURE, SI_ORDER_FIRST, mtx_destroy, &driver_lock);
#endif
static int num_adapters = 0;
More information about the p4-projects
mailing list