summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa/vector.s
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1994-11-01 23:29:50 +0000
committerbde <bde@FreeBSD.org>1994-11-01 23:29:50 +0000
commit4d89ead91e74e5a8e60f0f16733d9d8c15d82542 (patch)
tree08fde7bf95cd32cf58322e62a2f25b47b58dbc1f /sys/amd64/isa/vector.s
parent2fc13b8dd21726f57727d8b4e4a95d8cbc12f1a4 (diff)
downloadFreeBSD-src-4d89ead91e74e5a8e60f0f16733d9d8c15d82542.zip
FreeBSD-src-4d89ead91e74e5a8e60f0f16733d9d8c15d82542.tar.gz
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.
Diffstat (limited to 'sys/amd64/isa/vector.s')
-rw-r--r--sys/amd64/isa/vector.s9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/amd64/isa/vector.s b/sys/amd64/isa/vector.s
index 4e5037c..1bc2324 100644
--- a/sys/amd64/isa/vector.s
+++ b/sys/amd64/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 <i386/isa/icu.h>
+#include <i386/isa/isa.h>
#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. */ \
OpenPOWER on IntegriCloud