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:
parent
5a280d9cd1
commit
46700f1259
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78366
@ -324,7 +324,7 @@ gusc_attach(device_t dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (scp->irq != NULL)
|
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);
|
bus_generic_attach(dev);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -207,7 +207,7 @@ gusmidi_init(device_t dev)
|
|||||||
|
|
||||||
midiinit(devinfo, 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);
|
&scp->ih);
|
||||||
|
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -385,7 +385,7 @@ mpu_attach(device_t dev)
|
|||||||
|
|
||||||
/* Now we can handle the interrupts. */
|
/* Now we can handle the interrupts. */
|
||||||
if (scp->irq != NULL)
|
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);
|
&scp->ih);
|
||||||
|
|
||||||
DEB(printf("mpu: attached.\n"));
|
DEB(printf("mpu: attached.\n"));
|
||||||
|
@ -253,7 +253,7 @@ uartsio_attach(device_t dev)
|
|||||||
midiinit(devinfo, dev);
|
midiinit(devinfo, dev);
|
||||||
|
|
||||||
/* Now we can handle the interrupts. */
|
/* 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"));
|
DEB(printf("uartsio: attached.\n"));
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ csamidi_attach(device_t dev)
|
|||||||
midiinit(devinfo, dev);
|
midiinit(devinfo, dev);
|
||||||
|
|
||||||
/* Enable interrupt. */
|
/* 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);
|
csamidi_releaseres(scp, dev);
|
||||||
return (ENXIO);
|
return (ENXIO);
|
||||||
}
|
}
|
||||||
|
@ -760,7 +760,7 @@ sv_attach(device_t dev) {
|
|||||||
sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
|
sc->irq = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->irqid,
|
||||||
0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
|
0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
|
||||||
if (!sc->irq ||
|
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");
|
device_printf(dev, "sv_attach: Unable to map interrupt\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
@ -103,9 +103,9 @@ snd_setup_intr(device_t dev, struct resource *res, int flags, driver_intr_t hand
|
|||||||
{
|
{
|
||||||
#ifdef USING_MUTEX
|
#ifdef USING_MUTEX
|
||||||
flags &= INTR_MPSAFE;
|
flags &= INTR_MPSAFE;
|
||||||
flags |= INTR_TYPE_TTY;
|
flags |= INTR_TYPE_AV;
|
||||||
#else
|
#else
|
||||||
flags = INTR_TYPE_TTY;
|
flags = INTR_TYPE_AV;
|
||||||
#endif
|
#endif
|
||||||
return bus_setup_intr(dev, res, flags, hand, param, cookiep);
|
return bus_setup_intr(dev, res, flags, hand, param, cookiep);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user