diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-04-23 22:20:23 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2011-04-23 22:20:23 +0000 |
commit | 70a1d08529640be7ae5bed9b9f06c8b241fdbb6d (patch) | |
tree | 1a6122f2b6c8b8f808195718c1756cf50e96f8d6 /sys/arch/hppa | |
parent | 12b08c32b732e1fe5f7d0ebc8f15d7251c6eefe6 (diff) |
Stop calling shared interrupt handlers as soon as one of them return 1
(positive interrupt was for me), like we do on other architectures.
This is done here, at the elroy(4) driver level, since this is where shared
PCI interrupts are handled. We could do something similar for dino(4) but
this optimization is probably not very relevant there.
ok deraadt@
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r-- | sys/arch/hppa/dev/apic.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/arch/hppa/dev/apic.c b/sys/arch/hppa/dev/apic.c index 59e3c4710ac..0c58d0fd445 100644 --- a/sys/arch/hppa/dev/apic.c +++ b/sys/arch/hppa/dev/apic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apic.c,v 1.12 2010/09/20 06:33:47 matthew Exp $ */ +/* $OpenBSD: apic.c,v 1.13 2011/04/23 22:20:22 kettenis Exp $ */ /* * Copyright (c) 2005 Michael Shalayeff @@ -236,12 +236,11 @@ apic_intr(void *v) int claimed = 0; while (iv) { - if (iv->handler(iv->arg)) { - if (iv->cnt) - iv->cnt->ec_count++; - else - claimed = 1; - } + claimed = iv->handler(iv->arg); + if (claimed != 0 && iv->cnt) + iv->cnt->ec_count++; + if (claimed == 1) + break; iv = iv->next; } |