Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F101987052
D32632.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32632.diff
View Options
Index: sys/kern/subr_intr.c
===================================================================
--- sys/kern/subr_intr.c
+++ sys/kern/subr_intr.c
@@ -406,9 +406,21 @@
mtx_assert(&isrc_table_lock, MA_OWNED);
+ /* allocation requesting specific number */
+ if ((isrc->isrc_flags & INTR_ISRCF_USE_IRQ) != 0) {
+ if (isrc->isrc_irq >= intr_nirq)
+ return (EINVAL);
+ else if (irq_sources[isrc->isrc_irq] != NULL)
+ return (EEXIST);
+ irq_sources[isrc->isrc_irq] = isrc;
+ return (0);
+ }
+
+ /* table known full, don't bother */
if (irq_next_free >= intr_nirq)
return (ENOSPC);
+ /* usual approach, look for an empty entry */
for (irq = irq_next_free; irq < intr_nirq; irq++) {
if (irq_sources[irq] == NULL)
goto found;
@@ -472,7 +484,6 @@
bzero(isrc, sizeof(struct intr_irqsrc));
isrc->isrc_dev = dev;
- isrc->isrc_irq = INTR_IRQ_INVALID; /* just to be safe */
isrc->isrc_flags = flags;
va_start(ap, fmt);
Index: sys/sys/intr.h
===================================================================
--- sys/sys/intr.h
+++ 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_USE_IRQ 0x80 /* use passed in ->isrc_irq value */
struct intr_pic;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 5:28 AM (21 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14505187
Default Alt Text
D32632.diff (1 KB)
Attached To
Mode
D32632: intrng: allow specifying an interrupt number during allocation
Attached
Detach File
Event Timeline
Log In to Comment