Print a message at boot for interrupt handlers created with INTR_MPSAFE

and/or INTR_FAST.  This belongs elsehwere and perhaps under bootverbose;
I'm committing it for now as it's uesful to know which drivers have
been converted and which have not.
This commit is contained in:
Sam Leffler 2003-09-05 22:51:18 +00:00
parent 8d8d970db1
commit 7c00e355a2

View File

@ -2055,10 +2055,20 @@ int
bus_setup_intr(device_t dev, struct resource *r, int flags,
driver_intr_t handler, void *arg, void **cookiep)
{
if (dev->parent == 0)
return (EINVAL);
return (BUS_SETUP_INTR(dev->parent, dev, r, flags,
handler, arg, cookiep));
int error;
if (dev->parent != 0) {
error = BUS_SETUP_INTR(dev->parent, dev, r, flags,
handler, arg, cookiep);
if (error == 0) {
if (flags & INTR_MPSAFE)
device_printf(dev, "[MPSAFE]\n");
if (flags & INTR_FAST)
device_printf(dev, "[FAST]\n");
}
} else
error = EINVAL;
return (error);
}
int