diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-15 22:59:08 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-15 22:59:08 +0000 |
commit | c38525da63f69afbdf3eb2d6740e009d7c8a68bc (patch) | |
tree | ca4f7cfdaf676a098dcb6eed69846155599321d6 | |
parent | 8a5fe27d0fd51c4c8bb0f3702ee9efd4e8d70b8b (diff) |
Don't forget to make sure IMR writes hit the hardware (by reading back
from the Hub) before continuing (this was missing in one place).
Also exit early from the interrupt mask handling loop if all sources have
been serviced.
-rw-r--r-- | sys/arch/sgi/sgi/ip27_machdep.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/sgi/sgi/ip27_machdep.c b/sys/arch/sgi/sgi/ip27_machdep.c index e7cb1546aab..429ee8db024 100644 --- a/sys/arch/sgi/sgi/ip27_machdep.c +++ b/sys/arch/sgi/sgi/ip27_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip27_machdep.c,v 1.5 2009/05/15 06:29:37 miod Exp $ */ +/* $OpenBSD: ip27_machdep.c,v 1.6 2009/05/15 22:59:07 miod Exp $ */ /* * Copyright (c) 2008, 2009 Miodrag Vallat. @@ -403,12 +403,16 @@ ip27_hub_intr_handler(intrmask_t hwpend, struct trap_frame *frame) } if (rc == 0) printf("spurious interrupt, source %d\n", bit); + + if ((isr ^= mask) == 0) + break; } /* * Reenable interrupts which have been serviced. */ IP27_LHUB_S(HUB_CPU0_IMR0, imr); + (void)IP27_LHUB_L(HUB_IR0); __asm__ (" .set noreorder\n"); cpl = icpl; |