diff options
author | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2014-10-05 11:46:19 +0000 |
---|---|---|
committer | Kenji Aoyama <aoyama@cvs.openbsd.org> | 2014-10-05 11:46:19 +0000 |
commit | 067b17b7c57e420a38eea6bfc712bae4792f764b (patch) | |
tree | 6fb7e063cd44b85b754ecebdbf5b16caacc1b5a2 /sys/arch | |
parent | 45ae0d4a273e0ff32536f658ff278e76d0ad6d1a (diff) |
Skip unnecessary processing in interrupt handler.
2 spc(4/luna88k)'s share the same level 3 interrupt on LUNA-88K2. So
returns earlier when the device is not the source of interrupt.
NetBSD has the same code.
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/mb89352.c#rev1.34
"it is the right thing to do" miod@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/luna88k/dev/mb89352.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/luna88k/dev/mb89352.c b/sys/arch/luna88k/dev/mb89352.c index 46195225a8a..deba9ca1505 100644 --- a/sys/arch/luna88k/dev/mb89352.c +++ b/sys/arch/luna88k/dev/mb89352.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mb89352.c,v 1.19 2014/06/07 11:55:35 aoyama Exp $ */ +/* $OpenBSD: mb89352.c,v 1.20 2014/10/05 11:46:18 aoyama Exp $ */ /* $NetBSD: mb89352.c,v 1.5 2000/03/23 07:01:31 thorpej Exp $ */ /* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */ @@ -1534,6 +1534,14 @@ spc_intr(void *arg) int n; /* + * On LUNA-88K2, 2 spc(4)'s share the level 3 interrupt. + * So, first, check if this deivce needs to process this interrupt. + */ + ints = bus_space_read_1(iot, ioh, INTS); + if (ints == 0) /* No interrupt event on this device */ + return 0; + + /* * Disable interrupt. */ bus_space_write_1(iot, ioh, SCTL, |