summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-09-05 22:51:18 +0000
committersam <sam@FreeBSD.org>2003-09-05 22:51:18 +0000
commit27b68e0947c6cecbcd383634979d4f8c818c30ca (patch)
tree7ceff8cf3739cce99373b6e6dfd5998aaccd3679 /sys/kern
parentb7c5acb1f2e86b904562f74ec1b5735eba81e26e (diff)
downloadFreeBSD-src-27b68e0947c6cecbcd383634979d4f8c818c30ca.zip
FreeBSD-src-27b68e0947c6cecbcd383634979d4f8c818c30ca.tar.gz
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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/subr_bus.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
index daabd8d..e5f9a98 100644
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -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
OpenPOWER on IntegriCloud