diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-12-21 22:39:12 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-12-21 22:39:12 +0000 |
commit | 34ebdda6b855c526466b838f23908b827fef51a7 (patch) | |
tree | 0b25632ce26ad899f2ceb9833d7e892cf7a9a535 /sys | |
parent | 25ab799fdca4ce453b15b3a21a5e0ac6f401bc80 (diff) |
Allow intr_dispatch() on hp300 to be used on the clock interrupt level
(level 6). Will be used shortly.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/hp300/intr.c | 31 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/locore.s | 9 | ||||
-rw-r--r-- | sys/arch/hp300/include/intr.h | 4 |
3 files changed, 31 insertions, 13 deletions
diff --git a/sys/arch/hp300/hp300/intr.c b/sys/arch/hp300/hp300/intr.c index 88f815797f9..90cf301ce49 100644 --- a/sys/arch/hp300/hp300/intr.c +++ b/sys/arch/hp300/hp300/intr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.c,v 1.24 2010/09/20 06:33:47 matthew Exp $ */ +/* $OpenBSD: intr.c,v 1.25 2011/12/21 22:39:10 miod Exp $ */ /* $NetBSD: intr.c,v 1.5 1998/02/16 20:58:30 thorpej Exp $ */ /*- @@ -67,7 +67,7 @@ u_short hp300_varpsl[NISR] = { PSL_S | PSL_IPL3, /* IPL_NET */ PSL_S | PSL_IPL3, /* IPL_TTY */ PSL_S | PSL_IPL5, /* IPL_VM */ - PSL_S | PSL_IPL6, /* IPL_CLOCK */ + PSL_S | PSL_IPL6, /* IPL_AUDIO, IPL_CLOCK */ PSL_S | PSL_IPL7 /* IPL_HIGH */ }; @@ -119,6 +119,10 @@ intr_computeipl() hp300_varpsl[IPL_TTY] = IPLTOPSL(ipl); break; + case IPL_AUDIO: + /* audio is always at level 6 */ + break; + default: panic("intr_computeipl: bad priority %d", isr->isr_priority); @@ -249,9 +253,12 @@ intr_dispatch(evec) list = &isr_list[ipl]; if (LIST_EMPTY(list)) { - printf("intr_dispatch: ipl %d unexpected\n", ipl); - if (++unexpected > 10) - panic("intr_dispatch: too many unexpected interrupts"); + if (ipl != IPL_CLOCK) { + printf("intr_dispatch: ipl %d unexpected\n", ipl); + if (++unexpected > 10) + panic("intr_dispatch:" + " too many unexpected interrupts"); + } return; } @@ -264,12 +271,14 @@ intr_dispatch(evec) handled |= rc; } - if (handled) - straycount = 0; - else if (++straycount > 50) - panic("intr_dispatch: too many stray interrupts"); - else - printf("intr_dispatch: stray level %d interrupt\n", ipl); + if (ipl != IPL_CLOCK) { + if (handled) + straycount = 0; + else if (++straycount > 50) + panic("intr_dispatch: too many stray interrupts"); + else + printf("intr_dispatch: stray level %d interrupt\n", ipl); + } } #ifdef DIAGNOSTIC diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s index 7799d306ea7..7db3b50cea0 100644 --- a/sys/arch/hp300/hp300/locore.s +++ b/sys/arch/hp300/hp300/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.67 2011/11/01 21:20:55 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.68 2011/12/21 22:39:10 miod Exp $ */ /* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */ /* @@ -67,6 +67,7 @@ #include <machine/asm.h> #include <machine/trap.h> +#include "audio.h" #include "ksyms.h" #ifdef USELEDS #include <hp300/hp300/leds.h> @@ -1178,6 +1179,12 @@ Lrecheck: addql #1,_C_LABEL(uvmexp)+UVMEXP_INTRS | chalk up another interrupt movb a0@(CLKSR),d0 | see if anything happened jmi Lclkagain | while we were in clockintr/statintr +#if NAUDIO >0 + movw sp@(22),sp@- | push exception vector info + clrw sp@- + jbsr _C_LABEL(intr_dispatch) | call dispatch routine + addql #4,sp +#endif INTERRUPT_RESTOREREG jra _ASM_LABEL(rei) | all done diff --git a/sys/arch/hp300/include/intr.h b/sys/arch/hp300/include/intr.h index 712b220a31f..f605d2ff84b 100644 --- a/sys/arch/hp300/include/intr.h +++ b/sys/arch/hp300/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.28 2011/03/23 16:54:34 pirofti Exp $ */ +/* $OpenBSD: intr.h,v 1.29 2011/12/21 22:39:11 miod Exp $ */ /* $NetBSD: intr.h,v 1.2 1997/07/24 05:43:08 scottr Exp $ */ /*- @@ -63,6 +63,7 @@ struct isr { #define IPL_NET 3 #define IPL_TTY 4 #define IPL_VM 5 +#define IPL_AUDIO 6 #define IPL_CLOCK 6 #define IPL_STATCLOCK 6 #define IPL_SCHED 7 @@ -82,6 +83,7 @@ extern unsigned short hp300_varpsl[NISR]; #define splbio() _splraise(hp300_varpsl[IPL_BIO]) #define splnet() _splraise(hp300_varpsl[IPL_NET]) #define spltty() _splraise(hp300_varpsl[IPL_TTY]) +#define splaudio() _splraise(PSL_S | PSL_IPL6) #define splclock() _splraise(PSL_S | PSL_IPL6) #define splstatclock() _splraise(PSL_S | PSL_IPL6) #define splvm() _splraise(PSL_S | PSL_IPL5) |