From 4d89ead91e74e5a8e60f0f16733d9d8c15d82542 Mon Sep 17 00:00:00 2001 From: bde Date: Tue, 1 Nov 1994 23:29:50 +0000 Subject: Fix a very old, very stupid race clearing the mask bit for the current interrupt. Other bits in imen and icu+1 are volatile. INTREN() and INTRDIS() in icu.h need to be changed similarly. Change #include's to 2.0 style. --- sys/i386/isa/vector.s | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/i386/isa') diff --git a/sys/i386/isa/vector.s b/sys/i386/isa/vector.s index 4e5037c..1bc2324 100644 --- a/sys/i386/isa/vector.s +++ b/sys/i386/isa/vector.s @@ -1,11 +1,10 @@ /* * from: vector.s, 386BSD 0.1 unknown origin - * $Id: vector.s,v 1.8 1994/08/18 05:09:36 davidg Exp $ + * $Id: vector.s,v 1.9 1994/09/20 21:35:49 bde Exp $ */ -#include "i386/isa/icu.h" -#include "i386/isa/isa.h" -#include "vector.h" +#include +#include #define ICU_EOI 0x20 /* XXX - define elsewhere */ @@ -185,11 +184,13 @@ Xresume/**/irq_num: ; \ movl %eax,_cpl ; \ sti ; \ call *_intr_handler + (irq_num) * 4 ; \ + cli ; /* must unmask _imen and icu atomically */ \ movb _imen + IRQ_BYTE(irq_num),%al ; \ andb $~IRQ_BIT(irq_num),%al ; \ movb %al,_imen + IRQ_BYTE(irq_num) ; \ FASTER_NOP ; \ outb %al,$icu+1 ; \ + sti ; /* XXX _doreti repeats the cli/sti */ \ MEXITCOUNT ; \ /* We could usually avoid the following jmp by inlining some of */ \ /* _doreti, but it's probably better to use less cache. */ \ -- cgit v1.1