Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143923155
D38453.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D38453.id.diff
View Options
diff --git a/sys/x86/include/intr_machdep.h b/sys/x86/include/intr_machdep.h
--- a/sys/x86/include/intr_machdep.h
+++ b/sys/x86/include/intr_machdep.h
@@ -110,9 +110,6 @@
struct intsrc {
struct pic *is_pic;
struct intr_event *is_event;
- u_long *is_count;
- u_long *is_straycount;
- u_int is_index;
u_int is_handlers;
u_int is_domain;
u_int is_cpu;
diff --git a/sys/x86/isa/atpic.c b/sys/x86/isa/atpic.c
--- a/sys/x86/isa/atpic.c
+++ b/sys/x86/isa/atpic.c
@@ -131,8 +131,6 @@
inthand_t *at_intr, *at_intr_pti;
int at_irq; /* Relative to PIC base. */
enum intr_trigger at_trigger;
- u_long at_count;
- u_long at_straycount;
};
static void atpic_register_sources(struct pic *pic);
@@ -464,8 +462,6 @@
for (i = 0, ai = atintrs; i < NUM_ISA_IRQS; i++, ai++) {
if (i == ICU_SLAVEID)
continue;
- ai->at_intsrc.is_count = &ai->at_count;
- ai->at_intsrc.is_straycount = &ai->at_straycount;
setidt(((struct atpic *)ai->at_intsrc.is_pic)->at_intbase +
ai->at_irq, pti ? ai->at_intr_pti : ai->at_intr, SDT_ATPIC,
SEL_KPL, GSEL_ATPIC);
diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c
--- a/sys/x86/x86/intr_machdep.c
+++ b/sys/x86/x86/intr_machdep.c
@@ -107,8 +107,6 @@
static void intr_init(void *__dummy);
static int intr_pic_registered(struct pic *pic);
static void intrcnt_setname(const char *name, int index);
-static void intrcnt_updatename(struct intsrc *is);
-static void intrcnt_register(struct intsrc *is);
/*
* SYSINIT levels for SI_SUB_INTR:
@@ -176,12 +174,11 @@
/*
* - 1 ??? dummy counter.
- * - 2 counters for each I/O interrupt.
* - 1 counter for each CPU for lapic timer.
- * - 1 counter for each CPU for the Hyper-V vmbus driver.
+ * - 1 counter for each CPU for hypervisor drivers.
* - 8 counters for each CPU for IPI counters for SMP.
*/
- nintrcnt = 1 + num_io_irqs * 2 + mp_ncpus * 2;
+ nintrcnt = 1 + mp_ncpus * 2;
#ifdef COUNT_IPIS
if (mp_ncpus > 1)
nintrcnt += 8 * mp_ncpus;
@@ -236,7 +233,6 @@
intr_event_destroy(isrc->is_event);
return (EEXIST);
}
- intrcnt_register(isrc);
interrupt_sources[vector] = isrc;
isrc->is_handlers = 0;
sx_xunlock(&intrsrc_lock);
@@ -267,7 +263,6 @@
arg, intr_priority(flags), flags, cookiep);
if (error == 0) {
sx_xlock(&intrsrc_lock);
- intrcnt_updatename(isrc);
isrc->is_handlers++;
if (isrc->is_handlers == 1) {
isrc->is_domain = domain;
@@ -294,7 +289,6 @@
isrc->is_pic->pic_disable_source(isrc, PIC_NO_EOI);
isrc->is_pic->pic_disable_intr(isrc);
}
- intrcnt_updatename(isrc);
sx_xunlock(&intrsrc_lock);
}
return (error);
@@ -333,7 +327,6 @@
* argument for counting hardware interrupts when they're
* processed too.
*/
- (*isrc->is_count)++;
VM_CNT_INC(v_intr);
ie = isrc->is_event;
@@ -352,7 +345,6 @@
*/
if ((strays = intr_event_handle(ie, frame)) != 0) {
isrc->is_pic->pic_disable_source(isrc, PIC_EOI);
- (*isrc->is_straycount)++;
if (strays < INTR_STRAY_LOG_MAX)
log(LOG_ERR, "stray irq%d\n", vector);
else if (strays == INTR_STRAY_LOG_MAX)
@@ -432,31 +424,6 @@
INTRNAME_LEN - 1, name);
}
-static void
-intrcnt_updatename(struct intsrc *is)
-{
-
- intrcnt_setname(is->is_event->ie_fullname, is->is_index);
-}
-
-static void
-intrcnt_register(struct intsrc *is)
-{
- char straystr[INTRNAME_LEN];
-
- KASSERT(is->is_event != NULL, ("%s: isrc with no event", __func__));
- mtx_lock_spin(&intrcnt_lock);
- MPASS(intrcnt_index + 2 <= nintrcnt);
- is->is_index = nintrcnt - 2;
- snprintf(straystr, sizeof(straystr), "stray irq%d",
- is->is_pic->pic_vector(is));
- intrcnt_updatename(is);
- is->is_count = &intrcnt[is->is_index];
- intrcnt_setname(straystr, is->is_index + 1);
- is->is_straycount = &intrcnt[is->is_index + 1];
- mtx_unlock_spin(&intrcnt_lock);
-}
-
void
intrcnt_add(const char *name, u_long **countp)
{
@@ -522,16 +489,11 @@
intr_describe(u_int vector, void *ih, const char *descr)
{
struct intsrc *isrc;
- int error;
isrc = intr_lookup_source(vector);
if (isrc == NULL)
return (EINVAL);
- error = intr_event_describe_handler(isrc->is_event, ih, descr);
- if (error)
- return (error);
- intrcnt_updatename(isrc);
- return (0);
+ return (intr_event_describe_handler(isrc->is_event, ih, descr));
}
void
@@ -732,9 +694,8 @@
isrc = interrupt_sources[i];
if (isrc == NULL)
continue;
- sbuf_printf(&sbuf, "%s:%d @cpu%d(domain%d): %ld\n",
+ sbuf_printf(&sbuf, "%s @cpu%d(domain%d): %lu\n",
isrc->is_event->ie_fullname,
- isrc->is_index,
isrc->is_cpu,
isrc->is_domain,
isrc->is_event->ie_intrcnt);
@@ -748,7 +709,7 @@
SYSCTL_PROC(_hw, OID_AUTO, intrs,
CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
0, 0, sysctl_hw_intrs, "A",
- "interrupt:number @cpu: count");
+ "interrupt @cpu: count");
/*
* Compare two, possibly NULL, entries in the interrupt source array
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 3, 1:14 AM (10 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28411695
Default Alt Text
D38453.id.diff (4 KB)
Attached To
Mode
D38453: intr/x86: remove normal interrupts from intrcnt/intrnames
Attached
Detach File
Event Timeline
Log In to Comment