diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -506,6 +506,12 @@ vsnprintf(isrc->isrc_name, INTR_ISRC_NAMELEN, fmt, ap); va_end(ap); + if (flags & INTR_ISRCF_EARLYALLOC) { + error = isrc_event_create(isrc); + if (error) + return (error); + } + mtx_lock(&isrc_table_lock); error = isrc_alloc_irq(isrc); if (error != 0) { diff --git a/sys/sys/intr.h b/sys/sys/intr.h --- a/sys/sys/intr.h +++ b/sys/sys/intr.h @@ -76,6 +76,7 @@ #define INTR_ISRCF_IPI 0x01 /* IPI interrupt */ #define INTR_ISRCF_PPI 0x02 /* PPI interrupt */ #define INTR_ISRCF_BOUND 0x04 /* bound to a CPU */ +#define INTR_ISRCF_EARLYALLOC 0x10 /* ask for early allocation of event */ struct intr_pic;