summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-06-18 16:08:46 +0000
committerbde <bde@FreeBSD.org>1998-06-18 16:08:46 +0000
commit3c6f0bafac37c5eba6dcd3fe8bf43d77e6a83bae (patch)
treec75da2b9d9c80e9c0e88dcbd4646756509ac486b /sys
parent5f62f0e8d098c625160e74c3257b2c9eae1a8cc2 (diff)
downloadFreeBSD-src-3c6f0bafac37c5eba6dcd3fe8bf43d77e6a83bae.zip
FreeBSD-src-3c6f0bafac37c5eba6dcd3fe8bf43d77e6a83bae.tar.gz
Converted isa_strayintr() to take a `void *' arg.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/isa/intr_machdep.c21
-rw-r--r--sys/amd64/isa/nmi.c21
-rw-r--r--sys/i386/isa/intr_machdep.c21
-rw-r--r--sys/i386/isa/nmi.c21
4 files changed, 44 insertions, 40 deletions
diff --git a/sys/amd64/isa/intr_machdep.c b/sys/amd64/isa/intr_machdep.c
index 6382d19..49c7f24 100644
--- a/sys/amd64/isa/intr_machdep.c
+++ b/sys/amd64/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.11 1998/05/31 10:53:52 bde Exp $
+ * $Id: intr_machdep.c,v 1.12 1998/06/18 15:32:06 bde Exp $
*/
#include "opt_auto_eoi.h"
@@ -80,7 +80,7 @@
* This is to accommodate "mixed-mode" programming for
* motherboards that don't connect the 8254 to the IO APIC.
*/
-#define AUTO_EOI_1
+#define AUTO_EOI_1 1
#endif
u_long *intr_countp[ICU_LEN];
@@ -117,7 +117,7 @@ static inthand_t *slowintr[ICU_LEN] = {
#endif /* APIC_IO */
};
-static ointhand2_t isa_strayintr;
+static inthand2_t isa_strayintr;
#ifdef PC98
#define NMI_PARITY 0x04
@@ -239,9 +239,10 @@ isa_defaultirq()
* Caught a stray interrupt, notify
*/
static void
-isa_strayintr(d)
- int d;
+isa_strayintr(vcookiep)
+ void *vcookiep;
{
+ int intr = (void **)vcookiep - &intr_unit[0];
/* DON'T BOTHER FOR NOW! */
/* for some reason, we get bursts of intr #7, even if not enabled! */
@@ -260,11 +261,11 @@ isa_strayintr(d)
* must be done before sending an EOI so it can't be done if
* we are using AUTO_EOI_1.
*/
- if (intrcnt[NR_DEVICES + d] <= 5)
- log(LOG_ERR, "stray irq %d\n", d);
- if (intrcnt[NR_DEVICES + d] == 5)
+ if (intrcnt[NR_DEVICES + intr] <= 5)
+ log(LOG_ERR, "stray irq %d\n", intr);
+ if (intrcnt[NR_DEVICES + intr] == 5)
log(LOG_CRIT,
- "too many stray irq %d's; not logging any more\n", d);
+ "too many stray irq %d's; not logging any more\n", intr);
}
/*
@@ -476,7 +477,7 @@ icu_unset(intr, handler)
intr_handler[intr] = isa_strayintr;
intr_mptr[intr] = NULL;
intr_mask[intr] = HWI_MASK | SWI_MASK;
- intr_unit[intr] = intr;
+ intr_unit[intr] = &intr_unit[intr];
#ifdef FAST_HI_XXX
/* XXX how do I re-create dvp here? */
setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr,
diff --git a/sys/amd64/isa/nmi.c b/sys/amd64/isa/nmi.c
index 6382d19..49c7f24 100644
--- a/sys/amd64/isa/nmi.c
+++ b/sys/amd64/isa/nmi.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.11 1998/05/31 10:53:52 bde Exp $
+ * $Id: intr_machdep.c,v 1.12 1998/06/18 15:32:06 bde Exp $
*/
#include "opt_auto_eoi.h"
@@ -80,7 +80,7 @@
* This is to accommodate "mixed-mode" programming for
* motherboards that don't connect the 8254 to the IO APIC.
*/
-#define AUTO_EOI_1
+#define AUTO_EOI_1 1
#endif
u_long *intr_countp[ICU_LEN];
@@ -117,7 +117,7 @@ static inthand_t *slowintr[ICU_LEN] = {
#endif /* APIC_IO */
};
-static ointhand2_t isa_strayintr;
+static inthand2_t isa_strayintr;
#ifdef PC98
#define NMI_PARITY 0x04
@@ -239,9 +239,10 @@ isa_defaultirq()
* Caught a stray interrupt, notify
*/
static void
-isa_strayintr(d)
- int d;
+isa_strayintr(vcookiep)
+ void *vcookiep;
{
+ int intr = (void **)vcookiep - &intr_unit[0];
/* DON'T BOTHER FOR NOW! */
/* for some reason, we get bursts of intr #7, even if not enabled! */
@@ -260,11 +261,11 @@ isa_strayintr(d)
* must be done before sending an EOI so it can't be done if
* we are using AUTO_EOI_1.
*/
- if (intrcnt[NR_DEVICES + d] <= 5)
- log(LOG_ERR, "stray irq %d\n", d);
- if (intrcnt[NR_DEVICES + d] == 5)
+ if (intrcnt[NR_DEVICES + intr] <= 5)
+ log(LOG_ERR, "stray irq %d\n", intr);
+ if (intrcnt[NR_DEVICES + intr] == 5)
log(LOG_CRIT,
- "too many stray irq %d's; not logging any more\n", d);
+ "too many stray irq %d's; not logging any more\n", intr);
}
/*
@@ -476,7 +477,7 @@ icu_unset(intr, handler)
intr_handler[intr] = isa_strayintr;
intr_mptr[intr] = NULL;
intr_mask[intr] = HWI_MASK | SWI_MASK;
- intr_unit[intr] = intr;
+ intr_unit[intr] = &intr_unit[intr];
#ifdef FAST_HI_XXX
/* XXX how do I re-create dvp here? */
setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr,
diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c
index 6382d19..49c7f24 100644
--- a/sys/i386/isa/intr_machdep.c
+++ b/sys/i386/isa/intr_machdep.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.11 1998/05/31 10:53:52 bde Exp $
+ * $Id: intr_machdep.c,v 1.12 1998/06/18 15:32:06 bde Exp $
*/
#include "opt_auto_eoi.h"
@@ -80,7 +80,7 @@
* This is to accommodate "mixed-mode" programming for
* motherboards that don't connect the 8254 to the IO APIC.
*/
-#define AUTO_EOI_1
+#define AUTO_EOI_1 1
#endif
u_long *intr_countp[ICU_LEN];
@@ -117,7 +117,7 @@ static inthand_t *slowintr[ICU_LEN] = {
#endif /* APIC_IO */
};
-static ointhand2_t isa_strayintr;
+static inthand2_t isa_strayintr;
#ifdef PC98
#define NMI_PARITY 0x04
@@ -239,9 +239,10 @@ isa_defaultirq()
* Caught a stray interrupt, notify
*/
static void
-isa_strayintr(d)
- int d;
+isa_strayintr(vcookiep)
+ void *vcookiep;
{
+ int intr = (void **)vcookiep - &intr_unit[0];
/* DON'T BOTHER FOR NOW! */
/* for some reason, we get bursts of intr #7, even if not enabled! */
@@ -260,11 +261,11 @@ isa_strayintr(d)
* must be done before sending an EOI so it can't be done if
* we are using AUTO_EOI_1.
*/
- if (intrcnt[NR_DEVICES + d] <= 5)
- log(LOG_ERR, "stray irq %d\n", d);
- if (intrcnt[NR_DEVICES + d] == 5)
+ if (intrcnt[NR_DEVICES + intr] <= 5)
+ log(LOG_ERR, "stray irq %d\n", intr);
+ if (intrcnt[NR_DEVICES + intr] == 5)
log(LOG_CRIT,
- "too many stray irq %d's; not logging any more\n", d);
+ "too many stray irq %d's; not logging any more\n", intr);
}
/*
@@ -476,7 +477,7 @@ icu_unset(intr, handler)
intr_handler[intr] = isa_strayintr;
intr_mptr[intr] = NULL;
intr_mask[intr] = HWI_MASK | SWI_MASK;
- intr_unit[intr] = intr;
+ intr_unit[intr] = &intr_unit[intr];
#ifdef FAST_HI_XXX
/* XXX how do I re-create dvp here? */
setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr,
diff --git a/sys/i386/isa/nmi.c b/sys/i386/isa/nmi.c
index 6382d19..49c7f24 100644
--- a/sys/i386/isa/nmi.c
+++ b/sys/i386/isa/nmi.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: intr_machdep.c,v 1.11 1998/05/31 10:53:52 bde Exp $
+ * $Id: intr_machdep.c,v 1.12 1998/06/18 15:32:06 bde Exp $
*/
#include "opt_auto_eoi.h"
@@ -80,7 +80,7 @@
* This is to accommodate "mixed-mode" programming for
* motherboards that don't connect the 8254 to the IO APIC.
*/
-#define AUTO_EOI_1
+#define AUTO_EOI_1 1
#endif
u_long *intr_countp[ICU_LEN];
@@ -117,7 +117,7 @@ static inthand_t *slowintr[ICU_LEN] = {
#endif /* APIC_IO */
};
-static ointhand2_t isa_strayintr;
+static inthand2_t isa_strayintr;
#ifdef PC98
#define NMI_PARITY 0x04
@@ -239,9 +239,10 @@ isa_defaultirq()
* Caught a stray interrupt, notify
*/
static void
-isa_strayintr(d)
- int d;
+isa_strayintr(vcookiep)
+ void *vcookiep;
{
+ int intr = (void **)vcookiep - &intr_unit[0];
/* DON'T BOTHER FOR NOW! */
/* for some reason, we get bursts of intr #7, even if not enabled! */
@@ -260,11 +261,11 @@ isa_strayintr(d)
* must be done before sending an EOI so it can't be done if
* we are using AUTO_EOI_1.
*/
- if (intrcnt[NR_DEVICES + d] <= 5)
- log(LOG_ERR, "stray irq %d\n", d);
- if (intrcnt[NR_DEVICES + d] == 5)
+ if (intrcnt[NR_DEVICES + intr] <= 5)
+ log(LOG_ERR, "stray irq %d\n", intr);
+ if (intrcnt[NR_DEVICES + intr] == 5)
log(LOG_CRIT,
- "too many stray irq %d's; not logging any more\n", d);
+ "too many stray irq %d's; not logging any more\n", intr);
}
/*
@@ -476,7 +477,7 @@ icu_unset(intr, handler)
intr_handler[intr] = isa_strayintr;
intr_mptr[intr] = NULL;
intr_mask[intr] = HWI_MASK | SWI_MASK;
- intr_unit[intr] = intr;
+ intr_unit[intr] = &intr_unit[intr];
#ifdef FAST_HI_XXX
/* XXX how do I re-create dvp here? */
setidt(flags & INTR_FAST ? TPR_FAST_INTS + intr : TPR_SLOW_INTS + intr,
OpenPOWER on IntegriCloud