Rework the interrupt code, shaving some cycles off in the process.

Rather than an "iointr" routine that decomposes a vector into an
IRQ, we maintain a vector table directly, hooking up each "iointr"
routine at the correct vector.  This also allows us to hook device
interrupts up to specific vectors (c.f. Jensen).

We can shave even more cycles off, here, and I will, but it requires
some changes to the alpha_shared_intr stuff.
This commit is contained in:
thorpej 2001-07-27 00:25:18 +00:00
parent 2256fe3c2a
commit 0fb6b9a8f8
32 changed files with 563 additions and 664 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: interrupt.c,v 1.62 2001/07/03 13:55:42 nathanw Exp $ */
/* $NetBSD: interrupt.c,v 1.63 2001/07/27 00:25:18 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -72,7 +72,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.62 2001/07/03 13:55:42 nathanw Exp $");
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.63 2001/07/27 00:25:18 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -103,8 +103,105 @@ __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.62 2001/07/03 13:55:42 nathanw Exp $
#include <sys/device.h>
#endif
struct scbvec scb_iovectab[SCB_VECTOIDX(SCB_SIZE - SCB_IOVECBASE)];
void netintr(void);
void scb_stray(void *, u_long);
void
scb_init(void)
{
u_long i;
for (i = 0; i < SCB_NIOVECS; i++) {
scb_iovectab[i].scb_func = scb_stray;
scb_iovectab[i].scb_arg = NULL;
}
}
void
scb_stray(void *arg, u_long vec)
{
printf("WARNING: stray interrupt, vector 0x%lx\n", vec);
}
void
scb_set(u_long vec, void (*func)(void *, u_long), void *arg)
{
u_long idx;
int s;
s = splhigh();
if (vec < SCB_IOVECBASE || vec >= SCB_SIZE ||
(vec & (SCB_VECSIZE - 1)) != 0)
panic("scb_set: bad vector 0x%lx", vec);
idx = SCB_VECTOIDX(vec - SCB_IOVECBASE);
if (scb_iovectab[idx].scb_func != scb_stray)
panic("scb_set: vector 0x%lx already occupied", vec);
scb_iovectab[idx].scb_func = func;
scb_iovectab[idx].scb_arg = arg;
splx(s);
}
u_long
scb_alloc(void (*func)(void *, u_long), void *arg)
{
u_long vec, idx;
int s;
s = splhigh();
/*
* Allocate "downwards", to avoid bumping into
* interrupts which are likely to be at the lower
* vector numbers.
*/
for (vec = SCB_SIZE - SCB_VECSIZE;
vec >= SCB_IOVECBASE; vec -= SCB_VECSIZE) {
idx = SCB_VECTOIDX(vec - SCB_IOVECBASE);
if (scb_iovectab[idx].scb_func == scb_stray) {
scb_iovectab[idx].scb_func = func;
scb_iovectab[idx].scb_arg = arg;
splx(s);
return (vec);
}
}
splx(s);
return (SCB_ALLOC_FAILED);
}
void
scb_free(u_long vec)
{
u_long idx;
int s;
s = splhigh();
if (vec < SCB_IOVECBASE || vec >= SCB_SIZE ||
(vec & (SCB_VECSIZE - 1)) != 0)
panic("scb_free: bad vector 0x%lx", vec);
idx = SCB_VECTOIDX(vec - SCB_IOVECBASE);
if (scb_iovectab[idx].scb_func == scb_stray)
panic("scb_free: vector 0x%lx is empty", vec);
scb_iovectab[idx].scb_func = scb_stray;
scb_iovectab[idx].scb_arg = (void *) vec;
splx(s);
}
void
interrupt(unsigned long a0, unsigned long a1, unsigned long a2,
struct trapframe *framep)
@ -191,19 +288,26 @@ interrupt(unsigned long a0, unsigned long a1, unsigned long a2,
break;
case ALPHA_INTR_DEVICE: /* I/O device interrupt */
{
struct scbvec *scb;
KDASSERT(a1 >= SCB_IOVECBASE && a1 < SCB_SIZE);
atomic_add_ulong(&sc->sc_evcnt_device.ev_count, 1);
atomic_add_ulong(&ci->ci_intrdepth, 1);
KERNEL_LOCK(LK_CANRECURSE|LK_EXCLUSIVE);
uvmexp.intrs++;
if (platform.iointr)
(*platform.iointr)(framep, a1);
scb = &scb_iovectab[SCB_VECTOIDX(a1 - SCB_IOVECBASE)];
(*scb->scb_func)(scb->scb_arg, a1);
KERNEL_UNLOCK();
atomic_sub_ulong(&ci->ci_intrdepth, 1);
break;
}
case ALPHA_INTR_PERF: /* performance counter interrupt */
printf("WARNING: received performance counter interrupt!\n");
@ -232,16 +336,6 @@ interrupt(unsigned long a0, unsigned long a1, unsigned long a2,
}
}
void
set_iointr(void (*niointr)(void *, unsigned long))
{
if (platform.iointr)
panic("set iointr twice");
platform.iointr = niointr;
}
void
machine_check(unsigned long mces, struct trapframe *framep,
unsigned long vector, unsigned long param)

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.247 2001/07/12 23:35:42 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.248 2001/07/27 00:25:18 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@ -74,7 +74,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2001/07/12 23:35:42 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.248 2001/07/27 00:25:18 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -241,6 +241,9 @@ alpha_init(pfn, ptb, bim, bip, biv)
ALPHA_TBIA();
alpha_pal_imb();
/* Initialize the SCB. */
scb_init();
cpu_id = cpu_number();
#if defined(MULTIPROCESSOR)

View File

@ -1,4 +1,4 @@
/* $NetBSD: shared_intr.c,v 1.15 2000/06/05 21:47:17 thorpej Exp $ */
/* $NetBSD: shared_intr.c,v 1.16 2001/07/27 00:25:19 thorpej Exp $ */
/*
* Copyright (c) 1996 Carnegie-Mellon University.
@ -33,7 +33,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.15 2000/06/05 21:47:17 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: shared_intr.c,v 1.16 2001/07/27 00:25:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@ -212,6 +212,14 @@ alpha_shared_intr_isactive(struct alpha_shared_intr *intr, unsigned int num)
return (intr[num].intr_q.tqh_first != NULL);
}
int
alpha_shared_intr_firstactive(struct alpha_shared_intr *intr, unsigned int num)
{
return (intr[num].intr_q.tqh_first != NULL &&
intr[num].intr_q.tqh_first->ih_q.tqe_next == NULL);
}
void
alpha_shared_intr_set_dfltsharetype(struct alpha_shared_intr *intr,
unsigned int num, int newdfltsharetype)

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpuconf.h,v 1.12 2000/06/08 03:10:06 thorpej Exp $ */
/* $NetBSD: cpuconf.h,v 1.13 2001/07/27 00:25:19 thorpej Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
@ -61,13 +61,11 @@ struct platform {
* Platform Specific Function Hooks
* cons_init - console initialization
* device_register - boot configuration aid
* iointr - I/O interrupt handler
* clockintr - Clock Interrupt Handler
* mcheck_handler - Platform Specific Machine Check Handler
*/
void (*cons_init)(void);
void (*device_register)(struct device *, void *);
void (*iointr)(void *, unsigned long);
void (*clockintr)(struct clockframe *);
void (*mcheck_handler)(unsigned long, struct trapframe *,
unsigned long, unsigned long);

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.48 2001/07/15 16:42:19 thorpej Exp $ */
/* $NetBSD: intr.h,v 1.49 2001/07/27 00:25:19 thorpej Exp $ */
/*-
* Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@ -72,6 +72,34 @@
#include <sys/queue.h>
#include <machine/atomic.h>
/*
* The Alpha System Control Block. This is 8k long, and you get
* 16 bytes per vector (i.e. the vector numbers are spaced 16
* apart).
*
* This is sort of a "shadow" SCB -- rather than the CPU jumping
* to (SCBaddr + (16 * vector)), like it does on the VAX, we get
* a vector number in a1. We use the SCB to look up a routine/arg
* and jump to it.
*
* Since we use the SCB only for I/O interrupts, we make it shorter
* than normal, starting it at vector 0x800 (the start of the I/O
* interrupt vectors).
*/
#define SCB_IOVECBASE 0x0800
#define SCB_VECSIZE 0x0010
#define SCB_SIZE 0x2000
#define SCB_VECTOIDX(x) ((x) >> 4)
#define SCB_IDXTOVEC(x) ((x) << 4)
#define SCB_NIOVECS SCB_VECTOIDX(SCB_SIZE - SCB_IOVECBASE)
struct scbvec {
void (*scb_func)(void *, u_long);
void *scb_arg;
};
/*
* Alpha interrupts come in at one of 4 levels:
*
@ -266,6 +294,8 @@ int alpha_shared_intr_get_sharetype(struct alpha_shared_intr *,
unsigned int);
int alpha_shared_intr_isactive(struct alpha_shared_intr *,
unsigned int);
int alpha_shared_intr_firstactive(struct alpha_shared_intr *,
unsigned int);
void alpha_shared_intr_set_dfltsharetype(struct alpha_shared_intr *,
unsigned int, int);
void alpha_shared_intr_set_maxstrays(struct alpha_shared_intr *,
@ -281,7 +311,14 @@ char *alpha_shared_intr_string(struct alpha_shared_intr *,
struct evcnt *alpha_shared_intr_evcnt(struct alpha_shared_intr *,
unsigned int);
void set_iointr(void (*)(void *, unsigned long));
extern struct scbvec scb_iovectab[];
void scb_init(void);
void scb_set(u_long, void (*)(void *, u_long), void *);
u_long scb_alloc(void (*)(void *, u_long), void *);
void scb_free(u_long);
#define SCB_ALLOC_FAILED ((u_long) -1)
#endif /* _KERNEL */
#endif /* ! _ALPHA_INTR_H_ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: com_jensenio.c,v 1.1 2000/07/12 20:36:08 thorpej Exp $ */
/* $NetBSD: com_jensenio.c,v 1.2 2001/07/27 00:25:19 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: com_jensenio.c,v 1.1 2000/07/12 20:36:08 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: com_jensenio.c,v 1.2 2001/07/27 00:25:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -71,7 +71,8 @@ struct com_jensenio_softc {
struct com_softc sc_com; /* real "com" softc */
/* Jensen-specific goo. */
void *sc_ih; /* interrupt handler */
char sc_vecstr[8];
struct evcnt sc_ev_intr;
};
int com_jensenio_match(struct device *, struct cfdata *, void *);
@ -83,6 +84,8 @@ struct cfattach com_jensenio_ca = {
com_jensenio_attach
};
void com_jensenio_intr(void *, u_long);
int
com_jensenio_match(struct device *parent, struct cfdata *match, void *aux)
{
@ -101,7 +104,6 @@ com_jensenio_attach(struct device *parent, struct device *self, void *aux)
struct com_jensenio_softc *jsc = (void *)self;
struct com_softc *sc = &jsc->sc_com;
struct jensenio_attach_args *ja = aux;
const char *intrstr;
sc->sc_iot = ja->ja_iot;
sc->sc_iobase = ja->ja_ioaddr;
@ -117,18 +119,13 @@ com_jensenio_attach(struct device *parent, struct device *self, void *aux)
com_attach_subr(sc);
intrstr = eisa_intr_string(ja->ja_ec, ja->ja_irq[0]);
jsc->sc_ih = eisa_intr_establish(ja->ja_ec, ja->ja_irq[0],
IST_EDGE, IPL_SERIAL, comintr, sc);
if (jsc->sc_ih == NULL) {
printf("%s: unable to establish interrupt",
sc->sc_dev.dv_xname);
if (intrstr != NULL)
printf(" at %s", intrstr);
printf("\n");
return;
}
printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
scb_set(ja->ja_irq[0], com_jensenio_intr, sc);
printf("%s: interrupting at vector 0x%x\n",
sc->sc_dev.dv_xname, ja->ja_irq[0]);
sprintf(jsc->sc_vecstr, "0x%x", ja->ja_irq[0]);
evcnt_attach_dynamic(&jsc->sc_ev_intr, EVCNT_TYPE_INTR,
NULL, "vector", jsc->sc_vecstr);
/*
* Shutdown hook for buggy BIOSs that don't recognize the UART
@ -138,6 +135,15 @@ com_jensenio_attach(struct device *parent, struct device *self, void *aux)
panic("com_jensenio_attach: could not establish shutdown hook");
}
void
com_jensenio_intr(void *arg, u_long vec)
{
struct com_jensenio_softc *jsc = arg;
jsc->sc_ev_intr.ev_count++;
(void) comintr(&jsc->sc_com);
}
void
com_jensenio_cleanup(void *arg)
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: jensenio.c,v 1.2 2000/08/14 02:14:24 thorpej Exp $ */
/* $NetBSD: jensenio.c,v 1.3 2001/07/27 00:25:19 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@ -50,7 +50,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.2 2000/08/14 02:14:24 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: jensenio.c,v 1.3 2001/07/27 00:25:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -76,9 +76,9 @@ const struct jensenio_dev {
bus_addr_t jd_ioaddr; /* I/O space address */
int jd_irq[2]; /* Jensen IRQs */
} jensenio_devs[] = {
{ "pckbc", IO_KBD, { 18, 19 } }, /* 0x980, 0x990 */
{ "com", IO_COM1, { 16, -1 } }, /* 0x900 */
{ "com", IO_COM2, { 17, -1 } }, /* 0x920 */
{ "pckbc", IO_KBD, { 0x980, 0x990 } },
{ "com", IO_COM1, { 0x900, -1 } },
{ "com", IO_COM2, { 0x920, -1 } },
{ "lpt", IO_LPT3, { 1, -1 } },
{ "mcclock", 0x170, { -1, -1 } },
{ NULL, 0, { -1, -1 } },

View File

@ -1,4 +1,4 @@
/* $NetBSD: jensenio_intr.c,v 1.2 2000/08/14 05:38:23 thorpej Exp $ */
/* $NetBSD: jensenio_intr.c,v 1.3 2001/07/27 00:25:19 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.2 2000/08/14 05:38:23 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: jensenio_intr.c,v 1.3 2001/07/27 00:25:19 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -62,13 +62,6 @@ static bus_space_tag_t pic_iot;
static bus_space_handle_t pic_ioh[2];
static bus_space_handle_t pic_elcr_ioh;
static const int irq_to_vector[] = {
0x900, /* com0 */
0x920, /* com1 */
0x980, /* keyboard */
0x990, /* mouse */
};
int jensenio_eisa_intr_map(void *, u_int, eisa_intr_handle_t *);
const char *jensenio_eisa_intr_string(void *, int);
const struct evcnt *jensenio_eisa_intr_evcnt(void *, int);
@ -77,13 +70,7 @@ void *jensenio_eisa_intr_establish(void *, int, int, int,
void jensenio_eisa_intr_disestablish(void *, void *);
int jensenio_eisa_intr_alloc(void *, int, int, int *);
/*
* We have 16 (E)ISA IRQs, plus 4 hard-wired vectors which we
* assign to "virtual" IRQs.
*/
#define JENSEN_MAX_IRQ 20
#define JENSEN_VECT_IRQ_BASE 16
#define JENSEN_IRQ_IS_EISA(x) ((x) < 16)
#define JENSEN_MAX_IRQ 16
struct alpha_shared_intr *jensenio_eisa_intr;
@ -110,10 +97,6 @@ const int jensenio_intr_deftype[JENSEN_MAX_IRQ] = {
IST_UNUSABLE, /* 13: not connected */
IST_NONE, /* 14: EISA pin D07 (SCSI) */
IST_NONE, /* 15: EISA pin D06 */
IST_EDGE, /* 16: com0 (vector 0x900) */
IST_EDGE, /* 17: com1 (vector 0x920) */
IST_EDGE, /* 18: keyboard (vector 0x980) */
IST_EDGE, /* 19: mouse (vector 0x990) */
};
static __inline void
@ -148,18 +131,10 @@ jensenio_intr_init(struct jensenio_config *jcp)
i, 0);
cp = alpha_shared_intr_string(jensenio_eisa_intr, i);
if (JENSEN_IRQ_IS_EISA(i)) {
sprintf(cp, "irq %d", i);
evcnt_attach_dynamic(alpha_shared_intr_evcnt(
jensenio_eisa_intr, i), EVCNT_TYPE_INTR,
NULL, "eisa", cp);
} else {
sprintf(cp, "0x%03x",
irq_to_vector[i - JENSEN_VECT_IRQ_BASE]);
evcnt_attach_dynamic(alpha_shared_intr_evcnt(
jensenio_eisa_intr, i), EVCNT_TYPE_INTR,
NULL, "vector", cp);
}
sprintf(cp, "irq %d", i);
evcnt_attach_dynamic(alpha_shared_intr_evcnt(
jensenio_eisa_intr, i), EVCNT_TYPE_INTR,
NULL, "eisa", cp);
}
/*
@ -186,20 +161,14 @@ jensenio_intr_init(struct jensenio_config *jcp)
ic->ic_intr_disestablish = jensenio_eisa_intr_disestablish;
ic->ic_intr_alloc = jensenio_eisa_intr_alloc;
ic->ic_intr_evcnt = jensenio_eisa_intr_evcnt;
set_iointr(jensenio_iointr);
}
int
jensenio_eisa_intr_map(void *v, u_int eirq, eisa_intr_handle_t *ihp)
{
if (JENSEN_IRQ_IS_EISA(eirq) == 0) {
printf("jensenio_eisa_intr_map: bad EISA IRQ %d\n",
eirq);
*ihp = -1;
return (1);
}
if (*ihp >= JENSEN_MAX_IRQ)
panic("jensenio_eisa_intr_map: bogus IRQ %d\n", *ihp);
if (jensenio_intr_deftype[eirq] == IST_UNUSABLE) {
printf("jensenio_eisa_intr_map: unusable irq %d\n",
@ -220,11 +189,7 @@ jensenio_eisa_intr_string(void *v, int eirq)
if (eirq >= JENSEN_MAX_IRQ)
panic("jensenio_eisa_intr_string: bogus IRQ %d\n", eirq);
if (JENSEN_IRQ_IS_EISA(eirq) == 0)
sprintf(irqstr, "vector 0x%03x",
irq_to_vector[eirq - JENSEN_VECT_IRQ_BASE]);
else
sprintf(irqstr, "eisa irq %d", eirq);
sprintf(irqstr, "eisa irq %d", eirq);
return (irqstr);
}
@ -233,7 +198,7 @@ const struct evcnt *
jensenio_eisa_intr_evcnt(void *v, int eirq)
{
if (eirq > 19)
if (eirq >= JENSEN_MAX_IRQ)
panic("jensenio_eisa_intr_evcnt: bogus IRQ %d\n", eirq);
return (alpha_shared_intr_evcnt(jensenio_eisa_intr, eirq));
@ -245,7 +210,7 @@ jensenio_eisa_intr_establish(void *v, int irq, int type, int level,
{
void *cookie;
if (irq > 19 || type == IST_NONE)
if (irq >= JENSEN_MAX_IRQ || type == IST_NONE)
panic("jensenio_eisa_intr_establish: bogus irq or type");
if (jensenio_intr_deftype[irq] == IST_UNUSABLE) {
@ -257,11 +222,9 @@ jensenio_eisa_intr_establish(void *v, int irq, int type, int level,
cookie = alpha_shared_intr_establish(jensenio_eisa_intr, irq,
type, level, fn, arg, "eisa irq");
if (JENSEN_IRQ_IS_EISA(irq) == 0)
return (cookie);
if (cookie != NULL &&
alpha_shared_intr_isactive(jensenio_eisa_intr, irq)) {
alpha_shared_intr_firstactive(jensenio_eisa_intr, irq)) {
scb_set(0x800 + SCB_IDXTOVEC(irq), jensenio_iointr, NULL);
jensenio_setlevel(irq,
alpha_shared_intr_get_sharetype(jensenio_eisa_intr,
irq) == IST_LEVEL);
@ -283,15 +246,11 @@ jensenio_eisa_intr_disestablish(void *v, void *cookie)
alpha_shared_intr_disestablish(jensenio_eisa_intr, cookie,
"eisa irq");
if (JENSEN_IRQ_IS_EISA(irq) == 0) {
splx(s);
return;
}
if (alpha_shared_intr_isactive(jensenio_eisa_intr, irq) == 0) {
jensenio_enable_intr(irq, 0);
alpha_shared_intr_set_dfltsharetype(jensenio_eisa_intr,
irq, jensenio_intr_deftype[irq]);
scb_free(0x800 + SCB_IDXTOVEC(irq));
}
splx(s);
@ -309,29 +268,13 @@ void
jensenio_iointr(void *framep, u_long vec)
{
int irq;
int need_eoi = 0;
switch (vec) {
case 0x900: irq = 16; break; /* com0 */
case 0x920: irq = 17; break; /* com1 */
case 0x980: irq = 18; break; /* keyboard */
case 0x990: irq = 19; break; /* mouse */
default:
if (vec >= 0x800) {
if (vec >= 0x800 + (JENSEN_VECT_IRQ_BASE << 4))
panic("jensenio_iointr: vec 0x%lx out of "
"range\n", vec);
irq = (vec - 0x800) >> 4;
need_eoi = 1;
} else
panic("jensenio_iointr: wierd vec 0x%lx\n", vec);
}
irq = SCB_VECTOIDX(vec - 0x800);
if (!alpha_shared_intr_dispatch(jensenio_eisa_intr, irq))
alpha_shared_intr_stray(jensenio_eisa_intr, irq, "eisa irq");
if (need_eoi)
jensenio_specific_eoi(irq);
jensenio_specific_eoi(irq);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: lpt_jensenio.c,v 1.1 2000/07/12 20:36:10 thorpej Exp $ */
/* $NetBSD: lpt_jensenio.c,v 1.2 2001/07/27 00:25:19 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: lpt_jensenio.c,v 1.1 2000/07/12 20:36:10 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: lpt_jensenio.c,v 1.2 2001/07/27 00:25:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -71,7 +71,8 @@ struct lpt_jensenio_softc {
struct lpt_softc sc_lpt; /* real "lpt" softc */
/* Jensen-specific goo. */
void *sc_ih; /* interrupt handler */
char sc_vecstr[8];
struct evcnt sc_ev_intr;
};
int lpt_jensenio_match(struct device *, struct cfdata *, void *);
@ -82,6 +83,8 @@ struct cfattach lpt_jensenio_ca = {
lpt_jensenio_attach
};
void lpt_jensenio_intr(void *, u_long);
int
lpt_jensenio_match(struct device *parent, struct cfdata *match, void *aux)
{
@ -100,7 +103,6 @@ lpt_jensenio_attach(struct device *parent, struct device *self, void *aux)
struct lpt_jensenio_softc *jsc = (void *)self;
struct lpt_softc *sc = &jsc->sc_lpt;
struct jensenio_attach_args *ja = aux;
const char *intrstr;
sc->sc_iot = ja->ja_iot;
@ -114,16 +116,20 @@ lpt_jensenio_attach(struct device *parent, struct device *self, void *aux)
lpt_attach_subr(sc);
intrstr = eisa_intr_string(ja->ja_ec, ja->ja_irq[0]);
jsc->sc_ih = eisa_intr_establish(ja->ja_ec, ja->ja_irq[0],
IST_EDGE, IPL_TTY, lptintr, sc);
if (jsc->sc_ih == NULL) {
printf("%s: unable to establish interrupt",
sc->sc_dev.dv_xname);
if (intrstr != NULL)
printf(" at %s", intrstr);
printf("\n");
return;
}
printf("%s: interrupting at %s\n", sc->sc_dev.dv_xname, intrstr);
scb_set(ja->ja_irq[0], lpt_jensenio_intr, sc);
printf("%s: interrupting at vector 0x%x\n",
sc->sc_dev.dv_xname, ja->ja_irq[0]);
sprintf(jsc->sc_vecstr, "0x%x", ja->ja_irq[0]);
evcnt_attach_dynamic(&jsc->sc_ev_intr, EVCNT_TYPE_INTR,
NULL, "vector", jsc->sc_vecstr);
}
void
lpt_jensenio_intr(void *arg, u_long vec)
{
struct lpt_jensenio_softc *jsc = arg;
jsc->sc_ev_intr.ev_count++;
(void) lptintr(&jsc->sc_lpt);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pckbc_jensenio.c,v 1.2 2001/07/12 23:25:40 thorpej Exp $ */
/* $NetBSD: pckbc_jensenio.c,v 1.3 2001/07/27 00:25:19 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pckbc_jensenio.c,v 1.2 2001/07/12 23:25:40 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: pckbc_jensenio.c,v 1.3 2001/07/27 00:25:19 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -62,13 +62,18 @@ __KERNEL_RCSID(0, "$NetBSD: pckbc_jensenio.c,v 1.2 2001/07/12 23:25:40 thorpej E
#include <alpha/jensenio/jenseniovar.h>
struct pckbc_jensenio_intrcookie {
struct pckbc_softc *ic_sc;
struct evcnt ic_ev;
u_long ic_vector;
char ic_vecstr[8];
};
struct pckbc_jensenio_softc {
struct pckbc_softc sc_pckbc; /* real "pckbc" softc */
/* Jensen-specific goo. */
void *sc_ih[PCKBC_NSLOTS]; /* interrupt handlers */
int sc_irq[PCKBC_NSLOTS]; /* Sable IRQs to use */
eisa_chipset_tag_t sc_ec; /* EISA chipset for registering intrs */
struct pckbc_jensenio_intrcookie sc_ic[PCKBC_NSLOTS];
};
int pckbc_jensenio_match(struct device *, struct cfdata *, void *);
@ -80,6 +85,7 @@ struct cfattach pckbc_jensenio_ca = {
};
void pckbc_jensenio_intr_establish(struct pckbc_softc *, pckbc_slot_t);
void pckbc_jensenio_intr(void *, u_long);
int
pckbc_jensenio_match(struct device *parent, struct cfdata *match, void *aux)
@ -102,13 +108,11 @@ pckbc_jensenio_attach(struct device *parent, struct device *self, void *aux)
struct pckbc_internal *t;
bus_space_handle_t ioh_d, ioh_c;
jsc->sc_ec = ja->ja_ec;
/*
* Set up IRQs.
*/
jsc->sc_irq[PCKBC_KBD_SLOT] = ja->ja_irq[0];
jsc->sc_irq[PCKBC_AUX_SLOT] = ja->ja_irq[1];
jsc->sc_ic[PCKBC_KBD_SLOT].ic_vector = ja->ja_irq[0];
jsc->sc_ic[PCKBC_AUX_SLOT].ic_vector = ja->ja_irq[1];
sc->intr_establish = pckbc_jensenio_intr_establish;
@ -145,19 +149,25 @@ void
pckbc_jensenio_intr_establish(struct pckbc_softc *sc, pckbc_slot_t slot)
{
struct pckbc_jensenio_softc *jsc = (void *) sc;
const char *intrstr;
intrstr = eisa_intr_string(jsc->sc_ec, jsc->sc_irq[slot]);
jsc->sc_ih[slot] = eisa_intr_establish(jsc->sc_ec, jsc->sc_irq[slot],
IST_EDGE, IPL_TTY, pckbcintr, sc);
if (jsc->sc_ih[slot] == NULL) {
printf("%s: unable to establish interrupt for %s slot",
sc->sc_dv.dv_xname, pckbc_slot_names[slot]);
if (intrstr != NULL)
printf(" at %s", intrstr);
printf("\n");
return;
}
printf("%s: %s slot interrupting at %s\n", sc->sc_dv.dv_xname,
pckbc_slot_names[slot], intrstr);
jsc->sc_ic[slot].ic_sc = sc;
scb_set(jsc->sc_ic[slot].ic_vector, pckbc_jensenio_intr,
&jsc->sc_ic[slot]);
printf("%s: %s slot interrupting at vector 0x%lx\n", sc->sc_dv.dv_xname,
pckbc_slot_names[slot], jsc->sc_ic[slot].ic_vector);
sprintf(jsc->sc_ic[slot].ic_vecstr, "0x%lx",
jsc->sc_ic[slot].ic_vector);
evcnt_attach_dynamic(&jsc->sc_ic[slot].ic_ev, EVCNT_TYPE_INTR,
NULL, "vector", jsc->sc_ic[slot].ic_vecstr);
}
void
pckbc_jensenio_intr(void *arg, u_long vec)
{
struct pckbc_jensenio_intrcookie *ic = arg;
ic->ic_ev.ev_count++;
(void) pckbcintr(ic->ic_sc);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwlpx.c,v 1.22 2000/06/29 08:58:46 mrg Exp $ */
/* $NetBSD: dwlpx.c,v 1.23 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dwlpx.c,v 1.22 2000/06/29 08:58:46 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: dwlpx.c,v 1.23 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -69,7 +69,8 @@ struct cfattach dwlpx_ca = {
extern struct cfdriver dwlpx_cd;
static int dwlpxprint __P((void *, const char *));
static struct dwlpx_softc *dwlps[DWLPX_NIONODE][DWLPX_NHOSE];
void dwlpx_errintr(void *, u_long vec);
static int
dwlpxprint(aux, pnp)
@ -113,7 +114,7 @@ dwlpxattach(parent, self, aux)
sc->dwlpx_node = ka->ka_node;
sc->dwlpx_dtype = ka->ka_dtype;
sc->dwlpx_hosenum = ka->ka_hosenum;
dwlps[sc->dwlpx_node - 4][sc->dwlpx_hosenum] = sc;
dwlpx_init(sc);
dwlpx_dma_init(ccp);
@ -182,10 +183,10 @@ void
dwlpx_init(sc)
struct dwlpx_softc *sc;
{
int i;
u_int32_t ctl;
struct dwlpx_config *ccp = &sc->dwlpx_cc;
unsigned long ls = DWLPX_SYSBASE(sc);
unsigned long vec, ls = DWLPX_SYSBASE(sc);
int i;
if (ccp->cc_initted == 0) {
/*
@ -247,31 +248,17 @@ dwlpx_init(sc)
* Do this even for all HPCs- even for the nonexistent
* one on hose zero of a KFTIA.
*/
vec = scb_alloc(dwlpx_errintr, sc);
if (vec == SCB_ALLOC_FAILED)
panic("%s: unable to allocate error vector",
sc->dwlpx_dev.dv_xname);
printf("%s: error interrupt at vector 0x%lx\n",
sc->dwlpx_dev.dv_xname, vec);
for (i = 0; i < NHPC; i++) {
REGVAL(PCIA_IMASK(i) + ccp->cc_sysbase) = DWLPX_IMASK_DFLT;
REGVAL(PCIA_ERRVEC(i) + ccp->cc_sysbase) =
DWLPX_ERRVEC((sc->dwlpx_node - 4), sc->dwlpx_hosenum);
REGVAL(PCIA_ERRVEC(i) + ccp->cc_sysbase) = vec;
}
for (i = 0; i < DWLPX_MAXDEV; i++) {
u_int16_t vec;
int ss, hpc;
vec = DWLPX_MVEC((sc->dwlpx_node - 4), sc->dwlpx_hosenum, i);
ss = i;
if (i < 4) {
hpc = 0;
} else if (i < 8) {
ss -= 4;
hpc = 1;
} else {
ss -= 8;
hpc = 2;
}
REGVAL(PCIA_DEVVEC(hpc, ss, 1) + ccp->cc_sysbase) = vec;
REGVAL(PCIA_DEVVEC(hpc, ss, 2) + ccp->cc_sysbase) = vec;
REGVAL(PCIA_DEVVEC(hpc, ss, 3) + ccp->cc_sysbase) = vec;
REGVAL(PCIA_DEVVEC(hpc, ss, 4) + ccp->cc_sysbase) = vec;
}
/*
* Establish HAE values, as well as make sure of sanity elsewhere.
*/
@ -314,32 +301,24 @@ dwlpx_init(sc)
}
void
dwlpx_iointr(framep, vec)
void *framep;
dwlpx_errintr(arg, vec)
void *arg;
unsigned long vec;
{
struct dwlpx_softc *sc;
struct dwlpx_config *ccp;
int ionode, hosenum, i;
struct dwlpx_softc *sc = arg;
struct dwlpx_config *ccp = &sc->dwlpx_cc;
int i;
struct {
u_int32_t err;
u_int32_t addr;
} hpcs[NHPC];
ionode = (vec >> 8) & 0xf;
hosenum = (vec >> 4) & 0x7;
if (ionode >= DWLPX_NIONODE || hosenum >= DWLPX_NHOSE) {
panic("dwlpx_iointr: mangled vector 0x%lx", vec);
/* NOTREACHED */
}
sc = dwlps[ionode][hosenum];
ccp = &sc->dwlpx_cc;
for (i = 0; i < sc->dwlpx_nhpc; i++) {
hpcs[i].err = REGVAL(PCIA_ERR(i) + ccp->cc_sysbase);
hpcs[i].addr = REGVAL(PCIA_FADR(i) + ccp->cc_sysbase);
}
printf("%s: node %d hose %d error interrupt\n",
sc->dwlpx_dev.dv_xname, ionode + 4, hosenum);
sc->dwlpx_dev.dv_xname, sc->dwlpx_node, sc->dwlpx_hosenum);
for (i = 0; i < sc->dwlpx_nhpc; i++) {
if ((hpcs[i].err & PCIA_ERR_ERROR) == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: dwlpxvar.h,v 1.7 1998/04/15 00:49:17 mjacob Exp $ */
/* $NetBSD: dwlpxvar.h,v 1.8 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
@ -79,11 +79,6 @@ void dwlpx_dma_init __P((struct dwlpx_config *));
void dwlpx_bus_io_init __P((bus_space_tag_t, void *));
void dwlpx_bus_mem_init __P((bus_space_tag_t, void *));
/*
* IO Interrupt handler.
*/
void dwlpx_iointr __P((void *, unsigned long));
/*
* Each DWLPX supports up to 15 devices, 12 of which are PCI slots.
*
@ -95,32 +90,6 @@ void dwlpx_iointr __P((void *, unsigned long));
#define DWLPX_NIONODE 5
#define DWLPX_NHOSE 4
/*
* Interrupt Cookie for DWLPX vectors.
*
* Bits 0..3 PCI Slot (0..11)
* Bits 4..7 I/O Hose (0..3)
* Bits 8..11 I/O Node (0..4)
* Bit 15 Constant 1
*/
#define DWLPX_VEC_MARK (1<<15)
#define DWLPX_MVEC(ionode, hose, pcislot) \
(DWLPX_VEC_MARK | (ionode << 8) | (hose << 4) | (pcislot))
#define DWLPX_MVEC_IONODE(cookie) \
((((u_int64_t)(cookie)) >> 8) & 0xf)
#define DWLPX_MVEC_HOSE(cookie) \
((((u_int64_t)(cookie)) >> 4) & 0xf)
#define DWLPX_MVEC_PCISLOT(cookie) \
(((u_int64_t)(cookie)) & 0xf)
/*
* DWLPX Error Interrupt
*/
#define DWLPX_VEC_EMARK (1<<14)
#define DWLPX_ERRVEC(ionode, hose) \
(DWLPX_VEC_EMARK | (ionode << 8) | (hose << 4))
/*
* Default values to put into DWLPX IMASK register(s)
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_1000.c,v 1.11 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_1000.c,v 1.12 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_1000.c,v 1.11 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_1000.c,v 1.12 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -107,7 +107,7 @@ void dec_1000_intr_disestablish __P((void *, void *));
struct alpha_shared_intr *dec_1000_pci_intr;
static void dec_1000_iointr __P((void *framep, unsigned long vec));
static void dec_1000_iointr __P((void *arg, unsigned long vec));
static void dec_1000_enable_intr __P((int irq));
static void dec_1000_disable_intr __P((int irq));
static void pci_1000_imi __P((void));
@ -153,7 +153,6 @@ pci_1000_pickintr(core, iot, memt, pc)
#if NSIO > 0 || NPCEB > 0
sio_intr_setup(pc, iot);
#endif
set_iointr(dec_1000_iointr);
}
int
@ -233,8 +232,10 @@ dec_1000_intr_establish(ccv, ih, level, func, arg)
level, func, arg, "dec_1000 irq");
if (cookie != NULL &&
alpha_shared_intr_isactive(dec_1000_pci_intr, ih))
alpha_shared_intr_firstactive(dec_1000_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), dec_1000_iointr, NULL);
dec_1000_enable_intr(ih);
}
return (cookie);
}
@ -254,38 +255,27 @@ dec_1000_intr_disestablish(ccv, cookie)
dec_1000_disable_intr(irq);
alpha_shared_intr_set_dfltsharetype(dec_1000_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
}
static void
dec_1000_iointr(framep, vec)
void *framep;
dec_1000_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
if (vec >= 0x900) {
if (vec >= 0x900 + (PCI_NIRQ << 4))
panic("dec_1000_iointr: vec 0x%lx out of range\n", vec);
irq = (vec - 0x900) >> 4;
irq = SCB_VECTOIDX(vec - 0x900);
if (!alpha_shared_intr_dispatch(dec_1000_pci_intr, irq)) {
alpha_shared_intr_stray(dec_1000_pci_intr, irq,
"dec_1000 irq");
if (ALPHA_SHARED_INTR_DISABLE(dec_1000_pci_intr, irq))
dec_1000_disable_intr(irq);
}
return;
if (!alpha_shared_intr_dispatch(dec_1000_pci_intr, irq)) {
alpha_shared_intr_stray(dec_1000_pci_intr, irq,
"dec_1000 irq");
if (ALPHA_SHARED_INTR_DISABLE(dec_1000_pci_intr, irq))
dec_1000_disable_intr(irq);
}
#if NSIO > 0 || NPCEB > 0
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("dec_1000_iointr: weird vec 0x%lx\n", vec);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_1000a.c,v 1.13 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_1000a.c,v 1.14 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -67,7 +67,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_1000a.c,v 1.13 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_1000a.c,v 1.14 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -111,7 +111,7 @@ void dec_1000a_intr_disestablish __P((void *, void *));
struct alpha_shared_intr *dec_1000a_pci_intr;
static void dec_1000a_iointr __P((void *framep, unsigned long vec));
static void dec_1000a_iointr __P((void *arg, unsigned long vec));
static void dec_1000a_enable_intr __P((int irq));
static void dec_1000a_disable_intr __P((int irq));
static void pci_1000a_imi __P((void));
@ -157,7 +157,6 @@ pci_1000a_pickintr(core, iot, memt, pc)
#if NSIO > 0 || NPCEB > 0
sio_intr_setup(pc, iot);
#endif
set_iointr(dec_1000a_iointr);
}
int
@ -254,8 +253,10 @@ dec_1000a_intr_establish(ccv, ih, level, func, arg)
level, func, arg, "dec_1000a irq");
if (cookie != NULL &&
alpha_shared_intr_isactive(dec_1000a_pci_intr, ih))
alpha_shared_intr_firstactive(dec_1000a_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), dec_1000a_iointr, NULL);
dec_1000a_enable_intr(ih);
}
return (cookie);
}
@ -275,6 +276,7 @@ dec_1000a_intr_disestablish(ccv, cookie)
dec_1000a_disable_intr(irq);
alpha_shared_intr_set_dfltsharetype(dec_1000a_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
@ -287,26 +289,14 @@ dec_1000a_iointr(framep, vec)
{
int irq;
if (vec >= 0x900) {
if (vec >= 0x900 + (PCI_NIRQ << 4))
panic("dec_1000a_iointr: vec 0x%lx out of range\n",
vec);
irq = (vec - 0x900) >> 4;
if (!alpha_shared_intr_dispatch(dec_1000a_pci_intr, irq)) {
alpha_shared_intr_stray(dec_1000a_pci_intr, irq,
"dec_1000a irq");
if (ALPHA_SHARED_INTR_DISABLE(dec_1000a_pci_intr, irq))
dec_1000a_disable_intr(irq);
}
return;
irq = SCB_VECTOIDX(vec - 0x900);
if (!alpha_shared_intr_dispatch(dec_1000a_pci_intr, irq)) {
alpha_shared_intr_stray(dec_1000a_pci_intr, irq,
"dec_1000a irq");
if (ALPHA_SHARED_INTR_DISABLE(dec_1000a_pci_intr, irq))
dec_1000a_disable_intr(irq);
}
#if NSIO > 0 || NPCEB > 0
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("dec_1000a_iointr: weird vec 0x%lx\n", vec);
}
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_2100_a50.c,v 1.29 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_2100_a50.c,v 1.30 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a50.c,v 1.29 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a50.c,v 1.30 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -93,7 +93,6 @@ pci_2100_a50_pickintr(acp)
#if NSIO
sio_intr_setup(pc, iot);
set_iointr(&sio_iointr);
#else
panic("pci_2100_a50_pickintr: no I/O interrupt handler (no sio)");
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_2100_a500.c,v 1.2 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_2100_a500.c,v 1.3 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a500.c,v 1.2 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_2100_a500.c,v 1.3 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -221,6 +221,9 @@ pci_2100_a500_pickintr(struct ttwoga_config *tcp)
T2_IRQ_IS_EISA(i) ? "eisa" : "T2", cp);
}
/* 64 16-byte vectors per hose. */
tcp->tc_vecbase = 0x800 + ((64 * 16) * tcp->tc_hose);
/*
* T2 uses a custom layout of cascaded 8259 PICs for interrupt
* control. T3 and T4 use a built-in interrupt controller.
@ -241,8 +244,6 @@ pci_2100_a500_pickintr(struct ttwoga_config *tcp)
tcp->tc_eoi = dec_2100_a500_icic_eoi;
dec_2100_a500_icic_init_intr(tcp);
}
set_iointr(dec_2100_a500_iointr);
}
void
@ -456,8 +457,11 @@ dec_2100_a500_intr_establish(void *v, pci_intr_handle_t ih, int level,
dec_2100_a500_intr_deftype[ih], level, func, arg, "T2 irq");
if (cookie != NULL &&
alpha_shared_intr_isactive(tcp->tc_intrtab, ih))
alpha_shared_intr_firstactive(tcp->tc_intrtab, ih)) {
scb_set(tcp->tc_vecbase + SCB_IDXTOVEC(ih),
dec_2100_a500_iointr, tcp);
(*tcp->tc_enable_intr)(tcp, ih, 1);
}
return (cookie);
}
@ -478,6 +482,7 @@ dec_2100_a500_intr_disestablish(void *v, void *cookie)
(*tcp->tc_enable_intr)(tcp, irq, 0);
alpha_shared_intr_set_dfltsharetype(tcp->tc_intrtab,
irq, dec_2100_a500_intr_deftype[irq]);
scb_free(tcp->tc_vecbase + SCB_IDXTOVEC(irq));
}
splx(s);
@ -576,7 +581,9 @@ dec_2100_a500_eisa_intr_establish(void *v, int eirq, int type, int level,
type, level, fn, arg, "T2 irq");
if (cookie != NULL &&
alpha_shared_intr_isactive(tcp->tc_intrtab, irq)) {
alpha_shared_intr_firstactive(tcp->tc_intrtab, irq)) {
scb_set(tcp->tc_vecbase + SCB_IDXTOVEC(irq),
dec_2100_a500_iointr, tcp);
(*tcp->tc_setlevel)(tcp, eirq,
alpha_shared_intr_get_sharetype(tcp->tc_intrtab,
irq) == IST_LEVEL);
@ -603,6 +610,7 @@ dec_2100_a500_eisa_intr_disestablish(void *v, void *cookie)
(*tcp->tc_enable_intr)(tcp, irq, 0);
alpha_shared_intr_set_dfltsharetype(tcp->tc_intrtab,
irq, dec_2100_a500_intr_deftype[irq]);
scb_free(tcp->tc_vecbase + SCB_IDXTOVEC(irq));
}
splx(s);
@ -641,26 +649,13 @@ do { \
} while (0)
void
dec_2100_a500_iointr(void *framep, u_long vec)
dec_2100_a500_iointr(void *arg, u_long vec)
{
struct ttwoga_config *tcp;
int irq, hose, vecbase, rv;
struct ttwoga_config *tcp = arg;
int irq, rv;
if (vec >= 0xc00) {
hose = 1;
vecbase = 0xc00;
} else if (vec >= 0x800) {
hose = 0;
vecbase = 0x800;
} else
panic("dec_2100_a500_iointr: weird vec 0x%lx\n", vec);
irq = SCB_VECTOIDX(vec - tcp->tc_vecbase);
tcp = &ttwoga_configuration[hose];
if (vec >= vecbase + (SABLE_MAX_IRQ << 4))
panic("dec_2100_a500_iointr: vec 0x%lx out of range\n",
vec);
irq = (vec - vecbase) >> 4;
rv = alpha_shared_intr_dispatch(tcp->tc_intrtab, irq);
(*tcp->tc_eoi)(tcp, irq);
if (rv == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_550.c,v 1.21 2001/03/27 01:39:51 ross Exp $ */
/* $NetBSD: pci_550.c,v 1.22 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_550.c,v 1.21 2001/03/27 01:39:51 ross Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_550.c,v 1.22 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -128,7 +128,7 @@ void *dec_550_pciide_compat_intr_establish __P((void *, struct device *,
struct alpha_shared_intr *dec_550_pci_intr;
void dec_550_iointr __P((void *framep, unsigned long vec));
void dec_550_iointr __P((void *arg, unsigned long vec));
void dec_550_intr_enable __P((int irq));
void dec_550_intr_disable __P((int irq));
@ -175,8 +175,6 @@ pci_550_pickintr(ccp)
#if NSIO
sio_intr_setup(pc, iot);
#endif
set_iointr(dec_550_iointr);
}
int
@ -327,8 +325,11 @@ dec_550_intr_establish(ccv, ih, level, func, arg)
cookie = alpha_shared_intr_establish(dec_550_pci_intr, ih, IST_LEVEL,
level, func, arg, "dec 550 irq");
if (cookie != NULL && alpha_shared_intr_isactive(dec_550_pci_intr, ih))
if (cookie != NULL &&
alpha_shared_intr_firstactive(dec_550_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), dec_550_iointr, NULL);
dec_550_intr_enable(ih);
}
return (cookie);
}
@ -362,6 +363,7 @@ dec_550_intr_disestablish(ccv, cookie)
dec_550_intr_disable(irq);
alpha_shared_intr_set_dfltsharetype(dec_550_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
@ -401,33 +403,23 @@ dec_550_pciide_compat_intr_establish(v, dev, pa, chan, func, arg)
}
void
dec_550_iointr(framep, vec)
void *framep;
dec_550_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
if (vec >= 0x900) {
irq = ((vec - 0x900) >> 4);
irq = SCB_VECTOIDX(vec - 0x900);
if (irq >= DEC_550_MAX_IRQ)
panic("550_iointr: vec 0x%lx out of range\n", vec);
if (irq >= DEC_550_MAX_IRQ)
panic("550_iointr: vec 0x%lx out of range\n", vec);
if (!alpha_shared_intr_dispatch(dec_550_pci_intr, irq)) {
alpha_shared_intr_stray(dec_550_pci_intr, irq,
"dec 550 irq");
if (ALPHA_SHARED_INTR_DISABLE(dec_550_pci_intr, irq))
dec_550_intr_disable(irq);
}
return;
if (!alpha_shared_intr_dispatch(dec_550_pci_intr, irq)) {
alpha_shared_intr_stray(dec_550_pci_intr, irq,
"dec 550 irq");
if (ALPHA_SHARED_INTR_DISABLE(dec_550_pci_intr, irq))
dec_550_intr_disable(irq);
}
#if NSIO
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("dec_550_iointr: weird vec 0x%lx\n", vec);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_6600.c,v 1.7 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_6600.c,v 1.8 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 1999 by Ross Harvey. All rights reserved.
@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: pci_6600.c,v 1.7 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_6600.c,v 1.8 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -91,7 +91,7 @@ void *dec_6600_pciide_compat_intr_establish __P((void *, struct device *,
struct alpha_shared_intr *dec_6600_pci_intr;
void dec_6600_iointr __P((void *framep, unsigned long vec));
void dec_6600_iointr __P((void *arg, unsigned long vec));
extern void dec_6600_intr_enable __P((int irq));
extern void dec_6600_intr_disable __P((int irq));
@ -136,7 +136,6 @@ pci_6600_pickintr(pcp)
sio_intr_setup(pc, iot);
dec_6600_intr_enable(55); /* irq line for sio */
#endif
set_iointr(dec_6600_iointr);
}
}
@ -243,8 +242,11 @@ dec_6600_intr_establish(acv, ih, level, func, arg)
cookie = alpha_shared_intr_establish(dec_6600_pci_intr, ih, IST_LEVEL,
level, func, arg, irqtype);
if (cookie != NULL && alpha_shared_intr_isactive(dec_6600_pci_intr, ih))
if (cookie != NULL &&
alpha_shared_intr_firstactive(dec_6600_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), dec_6600_iointr, NULL);
dec_6600_intr_enable(ih);
}
return (cookie);
}
@ -276,39 +278,30 @@ dec_6600_intr_disestablish(acv, cookie)
dec_6600_intr_disable(irq);
alpha_shared_intr_set_dfltsharetype(dec_6600_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
}
void
dec_6600_iointr(framep, vec)
void *framep;
dec_6600_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
if (vec >= 0x900) {
irq = (vec - 0x900) >> 4;
irq = SCB_VECTOIDX(vec - 0x900);
if (irq >= PCI_NIRQ)
panic("iointr: irq %d is too high", irq);
if (irq >= PCI_NIRQ)
panic("iointr: irq %d is too high", irq);
if (!alpha_shared_intr_dispatch(dec_6600_pci_intr, irq)) {
alpha_shared_intr_stray(dec_6600_pci_intr, irq,
irqtype);
if (ALPHA_SHARED_INTR_DISABLE(dec_6600_pci_intr, irq))
dec_6600_intr_disable(irq);
}
return;
if (!alpha_shared_intr_dispatch(dec_6600_pci_intr, irq)) {
alpha_shared_intr_stray(dec_6600_pci_intr, irq,
irqtype);
if (ALPHA_SHARED_INTR_DISABLE(dec_6600_pci_intr, irq))
dec_6600_intr_disable(irq);
}
#if NSIO
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("iointr: weird vec 0x%lx\n", vec);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_alphabook1.c,v 1.6 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_alphabook1.c,v 1.7 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_alphabook1.c,v 1.6 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_alphabook1.c,v 1.7 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -131,7 +131,6 @@ pci_alphabook1_pickintr(lcp)
#if NSIO
sio_intr_setup(pc, iot);
set_iointr(&sio_iointr);
#else
panic("pci_alphabook1_pickintr: no I/O interrupt handler (no sio)");
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_axppci_33.c,v 1.26 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_axppci_33.c,v 1.27 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_axppci_33.c,v 1.26 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_axppci_33.c,v 1.27 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -94,7 +94,6 @@ pci_axppci_33_pickintr(lcp)
#if NSIO
sio_intr_setup(pc, iot);
set_iointr(&sio_iointr);
#else
panic("pci_axppci_33_pickintr: no I/O interrupt handler (no sio)");
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_eb164.c,v 1.29 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_eb164.c,v 1.30 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_eb164.c,v 1.29 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_eb164.c,v 1.30 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -116,7 +116,7 @@ struct alpha_shared_intr *eb164_pci_intr;
bus_space_tag_t eb164_intrgate_iot;
bus_space_handle_t eb164_intrgate_ioh;
void eb164_iointr __P((void *framep, unsigned long vec));
void eb164_iointr __P((void *arg, unsigned long vec));
extern void eb164_intr_enable __P((int irq)); /* pci_eb164_intr.S */
extern void eb164_intr_disable __P((int irq)); /* pci_eb164_intr.S */
@ -167,8 +167,6 @@ pci_eb164_pickintr(ccp)
sio_intr_setup(pc, iot);
eb164_intr_enable(EB164_SIO_IRQ);
#endif
set_iointr(eb164_iointr);
}
int
@ -293,8 +291,11 @@ dec_eb164_intr_establish(ccv, ih, level, func, arg)
cookie = alpha_shared_intr_establish(eb164_pci_intr, ih, IST_LEVEL,
level, func, arg, "eb164 irq");
if (cookie != NULL && alpha_shared_intr_isactive(eb164_pci_intr, ih))
if (cookie != NULL &&
alpha_shared_intr_firstactive(eb164_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), eb164_iointr, NULL);
eb164_intr_enable(ih);
}
return (cookie);
}
@ -317,6 +318,7 @@ dec_eb164_intr_disestablish(ccv, cookie)
eb164_intr_disable(irq);
alpha_shared_intr_set_dfltsharetype(eb164_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
@ -356,32 +358,20 @@ dec_eb164_pciide_compat_intr_establish(v, dev, pa, chan, func, arg)
}
void
eb164_iointr(framep, vec)
void *framep;
eb164_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
if (vec >= 0x900) {
if (vec >= 0x900 + (EB164_MAX_IRQ << 4))
panic("eb164_iointr: vec 0x%lx out of range\n", vec);
irq = (vec - 0x900) >> 4;
irq = SCB_VECTOIDX(vec - 0x900);
if (!alpha_shared_intr_dispatch(eb164_pci_intr, irq)) {
alpha_shared_intr_stray(eb164_pci_intr, irq,
"eb164 irq");
if (ALPHA_SHARED_INTR_DISABLE(eb164_pci_intr, irq))
eb164_intr_disable(irq);
}
return;
if (!alpha_shared_intr_dispatch(eb164_pci_intr, irq)) {
alpha_shared_intr_stray(eb164_pci_intr, irq,
"eb164 irq");
if (ALPHA_SHARED_INTR_DISABLE(eb164_pci_intr, irq))
eb164_intr_disable(irq);
}
#if NSIO
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("eb164_iointr: weird vec 0x%lx\n", vec);
}
#if 0 /* THIS DOES NOT WORK! see pci_eb164_intr.S. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_eb64plus.c,v 1.9 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_eb64plus.c,v 1.10 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_eb64plus.c,v 1.9 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_eb64plus.c,v 1.10 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -110,7 +110,7 @@ struct alpha_shared_intr *eb64plus_pci_intr;
bus_space_tag_t eb64plus_intrgate_iot;
bus_space_handle_t eb64plus_intrgate_ioh;
void eb64plus_iointr __P((void *framep, unsigned long vec));
void eb64plus_iointr __P((void *arg, unsigned long vec));
extern void eb64plus_intr_enable __P((int irq)); /* pci_eb64plus_intr.S */
extern void eb64plus_intr_disable __P((int irq)); /* pci_eb64plus_intr.S */
@ -155,8 +155,6 @@ pci_eb64plus_pickintr(acp)
#if NSIO
sio_intr_setup(pc, iot);
#endif
set_iointr(eb64plus_iointr);
}
int
@ -238,8 +236,11 @@ dec_eb64plus_intr_establish(acv, ih, level, func, arg)
cookie = alpha_shared_intr_establish(eb64plus_pci_intr, ih, IST_LEVEL,
level, func, arg, "eb64+ irq");
if (cookie != NULL && alpha_shared_intr_isactive(eb64plus_pci_intr, ih))
if (cookie != NULL &&
alpha_shared_intr_firstactive(eb64plus_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), eb64plus_iointr, NULL);
eb64plus_intr_enable(ih);
}
return (cookie);
}
@ -259,38 +260,27 @@ dec_eb64plus_intr_disestablish(acv, cookie)
eb64plus_intr_disable(irq);
alpha_shared_intr_set_dfltsharetype(eb64plus_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
}
void
eb64plus_iointr(framep, vec)
void *framep;
eb64plus_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
if (vec >= 0x900) {
if (vec >= 0x900 + (EB64PLUS_MAX_IRQ << 4))
panic("eb64plus_iointr: vec 0x%lx out of range\n", vec);
irq = (vec - 0x900) >> 4;
irq = SCB_VECTOIDX(vec - 0x900);
if (!alpha_shared_intr_dispatch(eb64plus_pci_intr, irq)) {
alpha_shared_intr_stray(eb64plus_pci_intr, irq,
"eb64+ irq");
if (ALPHA_SHARED_INTR_DISABLE(eb64plus_pci_intr, irq))
eb64plus_intr_disable(irq);
}
return;
if (!alpha_shared_intr_dispatch(eb64plus_pci_intr, irq)) {
alpha_shared_intr_stray(eb64plus_pci_intr, irq,
"eb64+ irq");
if (ALPHA_SHARED_INTR_DISABLE(eb64plus_pci_intr, irq))
eb64plus_intr_disable(irq);
}
#if NSIO
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("eb64plus_iointr: weird vec 0x%lx\n", vec);
}
#if 0 /* THIS DOES NOT WORK! see pci_eb64plus_intr.S. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_eb66.c,v 1.9 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_eb66.c,v 1.10 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_eb66.c,v 1.9 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_eb66.c,v 1.10 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -110,7 +110,7 @@ struct alpha_shared_intr *eb66_pci_intr;
bus_space_tag_t eb66_intrgate_iot;
bus_space_handle_t eb66_intrgate_ioh;
void eb66_iointr __P((void *framep, unsigned long vec));
void eb66_iointr __P((void *arg, unsigned long vec));
extern void eb66_intr_enable __P((int irq)); /* pci_eb66_intr.S */
extern void eb66_intr_disable __P((int irq)); /* pci_eb66_intr.S */
@ -155,8 +155,6 @@ pci_eb66_pickintr(lcp)
#if NSIO
sio_intr_setup(pc, iot);
#endif
set_iointr(eb66_iointr);
}
int
@ -237,8 +235,11 @@ dec_eb66_intr_establish(lcv, ih, level, func, arg)
cookie = alpha_shared_intr_establish(eb66_pci_intr, ih, IST_LEVEL,
level, func, arg, "eb66 irq");
if (cookie != NULL && alpha_shared_intr_isactive(eb66_pci_intr, ih))
if (cookie != NULL &&
alpha_shared_intr_firstactive(eb66_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), eb66_iointr, NULL);
eb66_intr_enable(ih);
}
return (cookie);
}
@ -258,38 +259,27 @@ dec_eb66_intr_disestablish(lcv, cookie)
eb66_intr_disable(irq);
alpha_shared_intr_set_dfltsharetype(eb66_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
}
void
eb66_iointr(framep, vec)
void *framep;
eb66_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
if (vec >= 0x900) {
if (vec >= 0x900 + (EB66_MAX_IRQ << 4))
panic("eb66_iointr: vec 0x%lx out of range\n", vec);
irq = (vec - 0x900) >> 4;
irq = SCB_VECTOIDX(vec - 0x900);
if (!alpha_shared_intr_dispatch(eb66_pci_intr, irq)) {
alpha_shared_intr_stray(eb66_pci_intr, irq,
"eb66 irq");
if (ALPHA_SHARED_INTR_DISABLE(eb66_pci_intr, irq))
eb66_intr_disable(irq);
}
return;
if (!alpha_shared_intr_dispatch(eb66_pci_intr, irq)) {
alpha_shared_intr_stray(eb66_pci_intr, irq,
"eb66 irq");
if (ALPHA_SHARED_INTR_DISABLE(eb66_pci_intr, irq))
eb66_intr_disable(irq);
}
#if NSIO
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("eb66_iointr: weird vec 0x%lx\n", vec);
}
#if 0 /* THIS DOES NOT WORK! see pci_eb66_intr.S. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_kn20aa.c,v 1.41 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_kn20aa.c,v 1.42 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_kn20aa.c,v 1.41 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_kn20aa.c,v 1.42 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -71,7 +71,7 @@ void dec_kn20aa_intr_disestablish __P((void *, void *));
struct alpha_shared_intr *kn20aa_pci_intr;
void kn20aa_iointr __P((void *framep, unsigned long vec));
void kn20aa_iointr __P((void *arg, unsigned long vec));
void kn20aa_enable_intr __P((int irq));
void kn20aa_disable_intr __P((int irq));
@ -112,8 +112,6 @@ pci_kn20aa_pickintr(ccp)
sio_intr_setup(pc, iot);
kn20aa_enable_intr(KN20AA_PCEB_IRQ);
#endif
set_iointr(kn20aa_iointr);
}
int
@ -233,8 +231,10 @@ dec_kn20aa_intr_establish(ccv, ih, level, func, arg)
level, func, arg, "kn20aa irq");
if (cookie != NULL &&
alpha_shared_intr_isactive(kn20aa_pci_intr, ih))
alpha_shared_intr_firstactive(kn20aa_pci_intr, ih)) {
scb_set(0x900 + SCB_IDXTOVEC(ih), kn20aa_iointr, NULL);
kn20aa_enable_intr(ih);
}
return (cookie);
}
@ -257,38 +257,27 @@ dec_kn20aa_intr_disestablish(ccv, cookie)
kn20aa_disable_intr(irq);
alpha_shared_intr_set_dfltsharetype(kn20aa_pci_intr, irq,
IST_NONE);
scb_free(0x900 + SCB_IDXTOVEC(irq));
}
splx(s);
}
void
kn20aa_iointr(framep, vec)
void *framep;
kn20aa_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
if (vec >= 0x900) {
if (vec >= 0x900 + (KN20AA_MAX_IRQ << 4))
panic("kn20aa_iointr: vec 0x%lx out of range\n", vec);
irq = (vec - 0x900) >> 4;
irq = SCB_VECTOIDX(vec - 0x900);
if (!alpha_shared_intr_dispatch(kn20aa_pci_intr, irq)) {
alpha_shared_intr_stray(kn20aa_pci_intr, irq,
"kn20aa irq");
if (ALPHA_SHARED_INTR_DISABLE(kn20aa_pci_intr, irq))
kn20aa_disable_intr(irq);
}
return;
if (!alpha_shared_intr_dispatch(kn20aa_pci_intr, irq)) {
alpha_shared_intr_stray(kn20aa_pci_intr, irq,
"kn20aa irq");
if (ALPHA_SHARED_INTR_DISABLE(kn20aa_pci_intr, irq))
kn20aa_disable_intr(irq);
}
#if NSIO > 0 || NPCEB > 0
if (vec >= 0x800) {
sio_iointr(framep, vec);
return;
}
#endif
panic("kn20aa_iointr: weird vec 0x%lx\n", vec);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_kn300.c,v 1.22 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_kn300.c,v 1.23 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1998 by Matthew Jacob
@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_kn300.c,v 1.22 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_kn300.c,v 1.23 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -104,7 +104,6 @@ pci_kn300_pickintr(ccp, first)
"kn300", cp);
savirqs[g] = (char) -1;
}
set_iointr(kn300_iointr);
}
pc->pc_intr_v = ccp;
@ -218,7 +217,10 @@ dec_kn300_intr_establish(ccv, ih, level, func, arg)
cookie = alpha_shared_intr_establish(kn300_pci_intr, irq, IST_LEVEL,
level, func, arg, "kn300 irq");
if (cookie != NULL && alpha_shared_intr_isactive(kn300_pci_intr, irq)) {
if (cookie != NULL &&
alpha_shared_intr_firstactive(kn300_pci_intr, irq)) {
scb_set(MCPCIA_VEC_PCI + SCB_IDXTOVEC(irq),
kn300_iointr, NULL);
alpha_shared_intr_set_private(kn300_pci_intr, irq, ccp);
savirqs[irq] = (ih >> 11) & 0x1f;
kn300_enable_intr(ccp, savirqs[irq]);
@ -235,44 +237,14 @@ dec_kn300_intr_disestablish(ccv, cookie)
}
void
kn300_iointr(framep, vec)
void *framep;
kn300_iointr(arg, vec)
void *arg;
unsigned long vec;
{
struct mcpcia_softc *mcp;
u_long irq;
if (vec >= MCPCIA_VEC_EISA && vec < MCPCIA_VEC_PCI) {
#if NSIO > 0 || NPCEB > 0
sio_iointr(framep, vec);
return;
#else
static const char *plaint = "kn300_iointr: (E)ISA interrupt "
"support not configured for vector 0x%x";
if (mcpcia_eisaccp) {
kn300_disable_intr(mcpcia_eisaccp, KN300_PCEB_IRQ);
printf(plaint, vec);
} else {
panic(plaint, vec);
}
#endif
}
irq = (vec - MCPCIA_VEC_PCI) >> 4;
/*
* Check for I2C interrupts. These are technically within
* the PCI vector range, but no PCI device should ever map
* to them.
*/
if (vec == MCPCIA_I2C_CVEC) {
printf("i2c: controller interrupt\n");
return;
}
if (vec == MCPCIA_I2C_BVEC) {
printf("i2c: bus interrupt\n");
return;
}
irq = SCB_VECTOIDX(vec - MCPCIA_VEC_PCI);
if (alpha_shared_intr_dispatch(kn300_pci_intr, irq)) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_kn8ae.c,v 1.18 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_kn8ae.c,v 1.19 2001/07/27 00:25:20 thorpej Exp $ */
/*
* Copyright (c) 1997 by Matthew Jacob
@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_kn8ae.c,v 1.18 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_kn8ae.c,v 1.19 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -62,17 +62,10 @@ void *dec_kn8ae_intr_establish __P((void *, pci_intr_handle_t,
int, int (*func)(void *), void *));
void dec_kn8ae_intr_disestablish __P((void *, void *));
struct vectab {
int (*func) __P((void *));
void *arg;
} vectab[DWLPX_NIONODE][DWLPX_NHOSE][DWLPX_MAXDEV];
static u_int32_t imaskcache[DWLPX_NIONODE][DWLPX_NHOSE][NHPC];
int kn8ae_spurious __P((void *));
void kn8ae_iointr __P((void *framep, unsigned long vec));
void kn8ae_enadis_intr __P((pci_intr_handle_t, int));
void kn8ae_enable_intr __P((pci_intr_handle_t irq));
void kn8ae_disable_intr __P((pci_intr_handle_t irq));
void kn8ae_spurious __P((void *, u_long));
void kn8ae_enadis_intr __P((struct dwlpx_config *, pci_intr_handle_t, int));
void
pci_kn8ae_pickintr(ccp, first)
@ -96,15 +89,6 @@ pci_kn8ae_pickintr(ccp, first)
return;
}
for (io = 0; io < DWLPX_NIONODE; io++) {
for (hose = 0; hose < DWLPX_NHOSE; hose++) {
for (dev = 0; dev < DWLPX_MAXDEV; dev++) {
vectab[io][hose][dev].func = kn8ae_spurious;
vectab[io][hose][dev].arg = (void *)
(u_int64_t) DWLPX_MVEC(io, hose, dev);
}
}
}
for (io = 0; io < DWLPX_NIONODE; io++) {
for (hose = 0; hose < DWLPX_NHOSE; hose++) {
for (dev = 0; dev < NHPC; dev++) {
@ -112,9 +96,15 @@ pci_kn8ae_pickintr(ccp, first)
}
}
}
set_iointr(kn8ae_iointr);
}
#define IH_MAKE(vec, dev, pin) \
((vec) | ((dev) << 16) | ((pin) << 24))
#define IH_VEC(ih) ((ih) & 0xffff)
#define IH_DEV(ih) (((ih) >> 16) & 0xff)
#define IH_PIN(ih) (((ih) >> 24) & 0xff)
int
dec_kn8ae_intr_map(pa, ihp)
struct pci_attach_args *pa;
@ -123,8 +113,8 @@ dec_kn8ae_intr_map(pa, ihp)
pcitag_t bustag = pa->pa_intrtag;
int buspin = pa->pa_intrpin;
pci_chipset_tag_t pc = pa->pa_pc;
struct dwlpx_config *ccp = (struct dwlpx_config *)pc->pc_intr_v;
int device, ionode, hose;
int device;
u_long vec;
if (buspin == 0) {
/* No IRQ used. */
@ -135,16 +125,16 @@ dec_kn8ae_intr_map(pa, ihp)
return 1;
}
alpha_pci_decompose_tag(pc, bustag, NULL, &device, NULL);
ionode = ccp->cc_sc->dwlpx_node - 4;
hose = ccp->cc_sc->dwlpx_hosenum;
/*
* handle layout:
* bits 0..15 DWLPX_MVEC(ionode, hose, device)
* bits 16-24 buspin (1..N)
* bits 24-31 IPL
*/
*ihp = DWLPX_MVEC(ionode, hose, device) | (buspin << 16) | (14 << 24);
vec = scb_alloc(kn8ae_spurious, NULL);
if (vec == SCB_ALLOC_FAILED) {
printf("dec_kn8ae_intr_map: no vector available for "
"device %d pin %d\n", device, buspin);
return 1;
}
*ihp = IH_MAKE(vec, device, buspin);
return (0);
}
@ -154,8 +144,9 @@ dec_kn8ae_intr_string(ccv, ih)
pci_intr_handle_t ih;
{
static char irqstr[64];
sprintf(irqstr, "kn8ae irq %ld vector 0x%lx PCI Interrupt Pin %c",
(ih >> 24), ih & 0xffff, (int)(((ih >> 16) & 0x7) - 1) + 'A');
sprintf(irqstr, "vector 0x%lx", IH_VEC(ih));
return (irqstr);
}
@ -178,37 +169,48 @@ dec_kn8ae_intr_establish(ccv, ih, level, func, arg)
void *arg;
{
struct dwlpx_config *ccp = ccv;
void *cookie = NULL;
int ionode, hose, device, s;
struct vectab *vp;
void *cookie;
struct scbvec *scb;
u_long vec;
int pin, device, hpc;
ionode = ccp->cc_sc->dwlpx_node - 4;
hose = ccp->cc_sc->dwlpx_hosenum;
device = DWLPX_MVEC_PCISLOT(ih);
device = IH_DEV(ih);
pin = IH_PIN(ih);
vec = IH_VEC(ih);
if (ionode < 0 || ionode >= DWLPX_NIONODE) {
panic("dec_kn8ae_intr_establish: bad ionode %d\n", ionode);
}
if (hose < 0 || hose >= DWLPX_NHOSE) {
panic("dec_kn8ae_intr_establish: bad hose %d\n", hose);
}
if (device < 0 || device >= DWLPX_MAXDEV) {
panic("dec_kn8ae_intr_establish: bad device %d\n", device);
scb = &scb_iovectab[SCB_VECTOIDX(vec) - SCB_IOVECBASE];
if (scb->scb_func != kn8ae_spurious) {
printf("dec_kn8ae_intr_establish: vector 0x%lx not mapped\n",
vec);
return (NULL);
}
vp = &vectab[ionode][hose][device];
if (vp->func != kn8ae_spurious) {
printf("dec_kn8ae_intr_establish: vector 0x%lx already used\n",
ih & 0xffff);
return (cookie);
}
/*
* NOTE: The PCIA hardware doesn't support interrupt sharing,
* so we don't have to worry about it (in theory, at least).
*/
scb->scb_arg = arg;
alpha_mb();
scb->scb_func = (void (*)(void *, u_long))func;
alpha_mb();
if (device < 4) {
hpc = 0;
} else if (device < 8) {
device -= 4;
hpc = 1;
} else {
device -= 8;
hpc = 2;
}
REGVAL(PCIA_DEVVEC(hpc, device, pin) + ccp->cc_sysbase) = vec;
kn8ae_enadis_intr(ccp, ih, 1);
cookie = (void *) ih;
s = splhigh();
vp->func = func;
vp->arg = arg;
(void) splx(s);
kn8ae_enable_intr(ih);
cookie = (void *) (u_int64_t) DWLPX_MVEC(ionode, hose, device);
return (cookie);
}
@ -216,88 +218,49 @@ void
dec_kn8ae_intr_disestablish(ccv, cookie)
void *ccv, *cookie;
{
int ionode, hose, device, s;
struct vectab *vp;
struct dwlpx_config *ccp = ccv;
pci_intr_handle_t ih = (u_long) cookie;
struct scbvec *scb;
u_long vec;
ionode = DWLPX_MVEC_IONODE(cookie);
hose = DWLPX_MVEC_HOSE(cookie);
device = DWLPX_MVEC_PCISLOT(cookie);
if (ionode < 0 || ionode >= DWLPX_NIONODE ||
hose < 0 || hose >= DWLPX_NHOSE ||
device < 0 || device >= DWLPX_MAXDEV) {
return;
}
vp = &vectab[ionode][hose][device];
s = splhigh();
vp->func = kn8ae_spurious;
vp->arg = cookie;
(void) splx(s);
}
vec = IH_VEC(ih);
int
kn8ae_spurious(arg)
void *arg;
{
int ionode, hose, device;
ionode = DWLPX_MVEC_IONODE(arg);
hose = DWLPX_MVEC_HOSE(arg);
device = DWLPX_MVEC_PCISLOT(arg);
printf("Spurious Interrupt from TLSB Node %d Hose %d Slot %d\n",
ionode + 4, hose, device);
return (-1);
}
scb = &scb_iovectab[SCB_VECTOIDX(vec) - SCB_IOVECBASE];
kn8ae_enadis_intr(ccp, ih, 0);
void
kn8ae_iointr(framep, vec)
void *framep;
unsigned long vec;
{
struct vectab *vp;
int ionode, hose, device;
if ((vec & DWLPX_VEC_EMARK) != 0) {
dwlpx_iointr(framep, vec);
return;
}
if ((vec & DWLPX_VEC_MARK) == 0) {
panic("kn8ae_iointr: vec 0x%lx\n", vec);
/* NOTREACHED */
}
ionode = DWLPX_MVEC_IONODE(vec);
hose = DWLPX_MVEC_HOSE(vec);
device = DWLPX_MVEC_PCISLOT(vec);
if (ionode < 0 || ionode >= DWLPX_NIONODE ||
hose < 0 || hose >= DWLPX_NHOSE ||
device < 0 || device >= DWLPX_MAXDEV) {
panic("kn8ae_iointr: malformed vector 0x%lx\n", vec);
/* NOTREACHED */
}
vp = &vectab[ionode][hose][device];
if ((*vp->func)(vp->arg) == 0) {
#if 0
printf("kn8ae_iointr: TLSB Node %d Hose %d Slot %d - "
" unclaimed interrupt\n", ionode + 4, hose, device);
#endif
}
scb_free(vec);
}
void
kn8ae_enadis_intr(irq, onoff)
kn8ae_spurious(void *arg, u_long vec)
{
printf("Spurious interrupt on temporary interrupt vector 0x%lx\n",
vec);
}
void
kn8ae_enadis_intr(ccp, irq, onoff)
struct dwlpx_config *ccp;
pci_intr_handle_t irq;
int onoff;
{
struct dwlpx_softc *sc = ccp->cc_sc;
unsigned long paddr;
u_int32_t val;
int ionode, hose, device, hpc, busp, s;
ionode = DWLPX_MVEC_IONODE(irq);
hose = DWLPX_MVEC_HOSE(irq);
device = DWLPX_MVEC_PCISLOT(irq);
busp = 1 << (((irq >> 16) & 0xff) - 1);
ionode = sc->dwlpx_node - 4;
hose = sc->dwlpx_hosenum;
device = IH_DEV(irq);
busp = (1 << (IH_PIN(irq) - 1));
paddr = (1LL << 39);
paddr |= (unsigned long) ionode << 36;
paddr |= (unsigned long) hose << 34;
if (device < 4) {
hpc = 0;
} else if (device < 8) {
@ -323,17 +286,3 @@ kn8ae_enadis_intr(irq, onoff)
alpha_mb();
(void) splx(s);
}
void
kn8ae_enable_intr(irq)
pci_intr_handle_t irq;
{
kn8ae_enadis_intr(irq, 1);
}
void
kn8ae_disable_intr(irq)
pci_intr_handle_t irq;
{
kn8ae_enadis_intr(irq, 0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: pci_up1000.c,v 1.6 2000/12/28 22:59:07 sommerfeld Exp $ */
/* $NetBSD: pci_up1000.c,v 1.7 2001/07/27 00:25:20 thorpej Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: pci_up1000.c,v 1.6 2000/12/28 22:59:07 sommerfeld Exp $");
__KERNEL_RCSID(0, "$NetBSD: pci_up1000.c,v 1.7 2001/07/27 00:25:20 thorpej Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -96,7 +96,6 @@ pci_up1000_pickintr(struct irongate_config *icp)
#if NSIO
sio_intr_setup(pc, iot);
set_iointr(&sio_iointr);
#else
panic("pci_up1000_pickintr: no I/O interrupt handler (no sio)");
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: sio_pic.c,v 1.29 2000/12/18 21:49:08 thorpej Exp $ */
/* $NetBSD: sio_pic.c,v 1.30 2001/07/27 00:25:21 thorpej Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.29 2000/12/18 21:49:08 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sio_pic.c,v 1.30 2001/07/27 00:25:21 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -484,9 +484,12 @@ sio_intr_establish(v, irq, type, level, fn, arg)
cookie = alpha_shared_intr_establish(sio_intr, irq, type, level, fn,
arg, "isa irq");
if (cookie)
sio_setirqstat(irq, alpha_shared_intr_isactive(sio_intr, irq),
if (cookie != NULL &&
alpha_shared_intr_firstactive(sio_intr, irq)) {
scb_set(0x800 + SCB_IDXTOVEC(irq), sio_iointr, NULL);
sio_setirqstat(irq, 1,
alpha_shared_intr_get_sharetype(sio_intr, irq));
}
return (cookie);
}
@ -535,19 +538,23 @@ sio_intr_disestablish(v, cookie)
}
sio_setirqstat(irq, INITIALLY_ENABLED(irq), ist);
alpha_shared_intr_set_dfltsharetype(sio_intr, irq, ist);
/* Release our SCB vector. */
scb_free(0x800 + SCB_IDXTOVEC(irq));
}
splx(s);
}
void
sio_iointr(framep, vec)
void *framep;
sio_iointr(arg, vec)
void *arg;
unsigned long vec;
{
int irq;
irq = (vec - 0x800) >> 4;
irq = SCB_VECTOIDX(vec - 0x800);
#ifdef DIAGNOSTIC
if (irq > ICU_LEN || irq < 0)
panic("sio_iointr: irq out of range (%d)", irq);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttwogavar.h,v 1.1 2000/12/21 20:51:55 thorpej Exp $ */
/* $NetBSD: ttwogavar.h,v 1.2 2001/07/27 00:25:21 thorpej Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -94,6 +94,7 @@ struct ttwoga_config {
struct extent *tc_io_ex, *tc_d_mem_ex, *tc_s_mem_ex;
int tc_mallocsafe;
u_long tc_vecbase;
struct alpha_shared_intr *tc_intrtab;
void (*tc_enable_intr)(struct ttwoga_config *, int, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: tc_3000_300.c,v 1.25 2000/06/05 21:47:30 thorpej Exp $ */
/* $NetBSD: tc_3000_300.c,v 1.26 2001/07/27 00:25:21 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: tc_3000_300.c,v 1.25 2000/06/05 21:47:30 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tc_3000_300.c,v 1.26 2001/07/27 00:25:21 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -210,8 +210,8 @@ tc_3000_300_intrnull(val)
}
void
tc_3000_300_iointr(framep, vec)
void *framep;
tc_3000_300_iointr(arg, vec)
void *arg;
unsigned long vec;
{
u_int32_t tcir, ioasicir, ioasicimr;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tc_3000_500.c,v 1.23 2000/06/05 21:47:31 thorpej Exp $ */
/* $NetBSD: tc_3000_500.c,v 1.24 2001/07/27 00:25:21 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -29,7 +29,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: tc_3000_500.c,v 1.23 2000/06/05 21:47:31 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: tc_3000_500.c,v 1.24 2001/07/27 00:25:21 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -214,8 +214,8 @@ tc_3000_500_intrnull(val)
}
void
tc_3000_500_iointr(framep, vec)
void *framep;
tc_3000_500_iointr(arg, vec)
void *arg;
unsigned long vec;
{
u_int32_t ir;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tcasic.c,v 1.34 2001/03/04 13:36:20 ad Exp $ */
/* $NetBSD: tcasic.c,v 1.35 2001/07/27 00:25:21 thorpej Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -32,7 +32,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.34 2001/03/04 13:36:20 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: tcasic.c,v 1.35 2001/07/27 00:25:21 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -150,7 +150,9 @@ tcasicattach(parent, self, aux)
tc_dma_init();
(*intr_setup)();
set_iointr(iointr);
/* They all come in at 0x800. */
scb_set(0x800, iointr, NULL);
config_found(self, &tba, tcasicprint);
}