Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151136972
D38448.id116807.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
D38448.id116807.diff
View Options
diff --git a/sys/kern/kern_intr.c b/sys/kern/kern_intr.c
--- a/sys/kern/kern_intr.c
+++ b/sys/kern/kern_intr.c
@@ -300,6 +300,8 @@
ie->ie_flags = flags;
ie->ie_irq = irq;
ie->ie_cpu = NOCPU;
+ ie->ie_stray = 0;
+ ie->ie_intrcnt = 0;
CK_SLIST_INIT(&ie->ie_handlers);
mtx_init(&ie->ie_lock, "intr event", NULL, MTX_DEF);
@@ -1372,9 +1374,18 @@
intr_prof_stack_use(td, frame);
#endif
- /* An interrupt with no event or handlers is a stray interrupt. */
- if (ie == NULL || CK_SLIST_EMPTY(&ie->ie_handlers))
+ /* An interrupt with no event is a stray interrupt. */
+ if (ie == NULL)
+ return (EINVAL);
+
+ /* Increment the interrupt counter. */
+ atomic_add_long(&ie->ie_intrcnt, 1);
+
+ /* An interrupt with no handlers is a stray interrupt. */
+ if (CK_SLIST_EMPTY(&ie->ie_handlers)) {
+ atomic_add_long(&ie->ie_stray, 1);
return (EINVAL);
+ }
/*
* Execute fast interrupt handlers directly.
@@ -1475,8 +1486,10 @@
td->td_intr_nesting_level--;
#ifdef notyet
/* The interrupt is not aknowledged by any filter and has no ithread. */
- if (!thread && !filter)
+ if (!thread && !filter) {
+ atomic_add_long(&ie->ie_stray, 1);
return (EINVAL);
+ }
#endif
return (0);
}
diff --git a/sys/sys/interrupt.h b/sys/sys/interrupt.h
--- a/sys/sys/interrupt.h
+++ b/sys/sys/interrupt.h
@@ -127,6 +127,8 @@
int ie_cpu; /* CPU this event is bound to. */
volatile int ie_phase; /* Switched to establish a barrier. */
volatile int ie_active[2]; /* Filters in ISR context. */
+ u_long ie_stray; /* Stray interrupt counter */
+ u_long ie_intrcnt; /* Interrupt counter */
};
/* Interrupt event flags kept in ie_flags. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 8:24 AM (1 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31020747
Default Alt Text
D38448.id116807.diff (1 KB)
Attached To
Mode
D38448: kern/intr: add flags for multi-processor interrupts
Attached
Detach File
Event Timeline
Log In to Comment