diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-04-15 20:40:08 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2011-04-15 20:40:08 +0000 |
commit | 6c79978cbce731e6dd4f90352a13cdd25a500eeb (patch) | |
tree | aff1016153e9c8e9c986a3263124aaef9a489b73 /sys/arch/alpha/pci | |
parent | 54d01755e0c490f3abfc0ae79a651eac257ad0cf (diff) |
More than a decade ago, interrupt handlers on sparc started returning 0
(interrupt was not for me), 1 (positive interrupt was for me), or -1
(i am not sure...). We have continued with this practice in as many
drivers as possible, throughout the tree.
This makes some of the architectures use that information in their
interrupt handler calling code -- if 1 is returned (and we know
this specific machine does not have edge-shared interrupts), we
finish servicing other possible handlers on the same pin. If the
interrupt pin remains asserted (from a different device), we will
end up back in the interrupt servicing code of course... but this is
cheaper than calling all the chained interrupts on a pin.
This does of course count on shared level interrupts being properly
sorted by IPL.
There have been some concerns about starvation of drivers which
incorrectly return 1. Those drivers should be hunted down so that
they return -1.
(other architectures will follow)
ok kettenis drahn dlg miod
Diffstat (limited to 'sys/arch/alpha/pci')
-rw-r--r-- | sys/arch/alpha/pci/sio_pic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/alpha/pci/sio_pic.c b/sys/arch/alpha/pci/sio_pic.c index 8b65a4638b3..9ae639cf39d 100644 --- a/sys/arch/alpha/pci/sio_pic.c +++ b/sys/arch/alpha/pci/sio_pic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sio_pic.c,v 1.31 2009/09/30 20:16:31 miod Exp $ */ +/* $OpenBSD: sio_pic.c,v 1.32 2011/04/15 20:40:05 deraadt Exp $ */ /* $NetBSD: sio_pic.c,v 1.28 2000/06/06 03:10:13 thorpej Exp $ */ /*- @@ -586,6 +586,8 @@ sio_intr_alloc(v, mask, type, irq) return (0); case IST_EDGE: + intr_shared_edge = 1; + /* FALLTHROUGH */ case IST_LEVEL: if (type != sio_intr[i].intr_sharetype) continue; |