1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Use INTR_TYPE_AV for the interrupt handlers because:

1: most drivers are sensitive to timing, and
2: the handlers are MPSAFE and need a chance to get into the kernel
before some other non-mpsafe handler blocks the ithread on Giant in
shared irq cases.

Reviewed by:	cg  (in principle)
This commit is contained in:
Peter Wemm 2001-06-16 22:59:46 +00:00
parent 5a280d9cd1
commit 46700f1259
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78366
7 changed files with 8 additions and 8 deletions

View File

@ -324,7 +324,7 @@ gusc_attach(device_t dev)
}
if (scp->irq != NULL)
bus_setup_intr(dev, scp->irq, INTR_TYPE_TTY, gusc_intr, scp, &ih);
bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, gusc_intr, scp, &ih);
bus_generic_attach(dev);
return (0);

View File

@ -207,7 +207,7 @@ gusmidi_init(device_t dev)
midiinit(devinfo, dev);
bus_setup_intr(dev, scp->irq, INTR_TYPE_TTY, gusmidi_intr, scp,
bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, gusmidi_intr, scp,
&scp->ih);
return (0);

View File

@ -385,7 +385,7 @@ mpu_attach(device_t dev)
/* Now we can handle the interrupts. */
if (scp->irq != NULL)
bus_setup_intr(dev, scp->irq, INTR_TYPE_TTY, mpu_intr, scp,
bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, mpu_intr, scp,
&scp->ih);
DEB(printf("mpu: attached.\n"));

View File

@ -253,7 +253,7 @@ uartsio_attach(device_t dev)
midiinit(devinfo, dev);
/* Now we can handle the interrupts. */
bus_setup_intr(dev, scp->irq, INTR_TYPE_TTY, uartsio_intr, scp, &scp->ih);
bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, uartsio_intr, scp, &scp->ih);
DEB(printf("uartsio: attached.\n"));

View File

@ -202,7 +202,7 @@ csamidi_attach(device_t dev)
midiinit(devinfo, dev);
/* Enable interrupt. */
if (bus_setup_intr(dev, scp->irq, INTR_TYPE_TTY, csamidi_intr, scp, &scp->ih)) {
if (bus_setup_intr(dev, scp->irq, INTR_TYPE_AV, csamidi_intr, scp, &scp->ih)) {
csamidi_releaseres(scp, dev);
return (ENXIO);
}

View File

@ -760,7 +760,7 @@ sv_attach(device_t dev) {
sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
if (!sc->irq ||
bus_setup_intr(dev, sc->irq, INTR_TYPE_TTY, sv_intr, sc, &sc->ih)) {
bus_setup_intr(dev, sc->irq, INTR_TYPE_AV, sv_intr, sc, &sc->ih)) {
device_printf(dev, "sv_attach: Unable to map interrupt\n");
goto fail;
}

View File

@ -103,9 +103,9 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand
{
#ifdef USING_MUTEX
flags &= INTR_MPSAFE;
flags |= INTR_TYPE_TTY;
flags |= INTR_TYPE_AV;
#else
flags = INTR_TYPE_TTY;
flags = INTR_TYPE_AV;
#endif
return bus_setup_intr(dev, res, flags, hand, param, cookiep);
}