From 5f021f07dbc4db117a24abe7cc17ec8e5a82373a Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 6 Jul 1994 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1994-07-06 --- carrera/trap.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/carrera/trap.c b/carrera/trap.c index 04484b9b7b3ece3c684afd4dc865c527cdbc45aa..f1ad5c21af155c6c2ecf8cf4e382f1cc05a2bfa7 100644 --- a/carrera/trap.c +++ b/carrera/trap.c @@ -283,14 +283,6 @@ trap(Ureg *ur) } } -struct -{ - ulong cause; - ulong devint3; - ulong devint4; - ulong state; -}sisr; - void intr(Ureg *ur) { @@ -300,11 +292,8 @@ intr(Ureg *ur) m->intr++; cause &= INTR7|INTR6|INTR5|INTR4|INTR3|INTR2|INTR1|INTR0; -sisr.cause = cause; if(cause & INTR3) { devint = IO(uchar, Intcause); -sisr.devint3 = devint; -sisr.state = 0; switch(devint) { default: panic("unknown devint=#%lux", devint); @@ -328,11 +317,12 @@ sisr.state = 0; break; } cause &= ~INTR3; -sisr.state = 1; } + if(cause & INTR5) + panic("EISA NMI\n"); + if(cause & INTR2) { -sisr.state = 2; isr = IO(ulong, R4030Isr); if(isr) { iprint("R4030 Interrupt\n"); @@ -342,14 +332,11 @@ sisr.state = 2; iprint(" MFA #%lux\n", IO(ulong, R4030Mfa)); } cause &= ~INTR2; -sisr.state = 3; } if(cause & INTR4) { devint = IO(uchar, I386ack); vec = devint&~0x7; -sisr.devint4 = devint; -sisr.state = 4; /* reenable the 8259 interrupt */ if(vec == Int0vec || vec == Int1vec){ EISAOUTB(Int0ctl, EOI); @@ -362,18 +349,13 @@ sisr.state = 4; iprint("i386ACK #%lux\n", devint); break; case 7: -sisr.state = 5; audiosbintr(); -sisr.state = 6; break; case 13: -sisr.state = 7; audiodmaintr(); -sisr.state = 8; break; } cause &= ~INTR4; -sisr.state = 9; } if(cause & INTR7) {