diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-04-25 19:27:37 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2008-04-25 19:27:37 +0000 |
commit | 0ac852d05adeba5c03d31aa5d8fdbb5fccd56a47 (patch) | |
tree | 9aa4bb0e9a0713af8a0fa98b20a018123a4d14f2 /sys | |
parent | 6356d99e93ec44f374376c780246b6ef6c21ded2 (diff) |
When allocating an interrupt 'slot', always check all slots to see if we
already allocated a slot for a particular apic pin.
ok weingart@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/intr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/intr.c b/sys/arch/amd64/amd64/intr.c index 8455a9af1a7..a1101788861 100644 --- a/sys/arch/amd64/amd64/intr.c +++ b/sys/arch/amd64/amd64/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.15 2007/09/17 15:34:38 chl Exp $ */ +/* $OpenBSD: intr.c,v 1.16 2008/04/25 19:27:36 kettenis Exp $ */ /* $NetBSD: intr.c,v 1.3 2003/03/03 22:16:20 fvdl Exp $ */ /* @@ -205,6 +205,14 @@ intr_allocate_slot_cpu(struct cpu_info *ci, struct pic *pic, int pin, slot = -1; simple_lock(&ci->ci_slock); + for (i = 0; i < start; i++) { + isp = ci->ci_isources[i]; + if (isp != NULL && isp->is_pic == pic && isp->is_pin == pin) { + slot = i; + start = MAX_INTR_SOURCES; + break; + } + } for (i = start; i < MAX_INTR_SOURCES ; i++) { isp = ci->ci_isources[i]; if (isp != NULL && isp->is_pic == pic && isp->is_pin == pin) { |