diff options
author | bde <bde@FreeBSD.org> | 1994-11-06 00:23:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1994-11-06 00:23:45 +0000 |
commit | 45ffea91d2361560e5c68083a022897e3878fa35 (patch) | |
tree | 8e0327004014fd530fdc883e7bd67e0018b0ab91 | |
parent | e9219cbad824a63d0c82c9541ca2b29364bb82e0 (diff) | |
download | FreeBSD-src-45ffea91d2361560e5c68083a022897e3878fa35.zip FreeBSD-src-45ffea91d2361560e5c68083a022897e3878fa35.tar.gz |
Work around microtime() enabling interrupts.
-rw-r--r-- | sys/dev/sio/sio.c | 11 | ||||
-rw-r--r-- | sys/i386/isa/sio.c | 11 | ||||
-rw-r--r-- | sys/isa/sio.c | 11 |
3 files changed, 30 insertions, 3 deletions
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index 0d16b1f..13db874 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.58 1994/10/23 21:27:34 wollman Exp $ + * $Id: sio.c,v 1.59 1994/11/01 23:09:29 bde Exp $ */ #include "sio.h" @@ -1022,7 +1022,16 @@ void siointrts(unit) int unit; { + /* + * XXX microtime() reenables CPU interrupts. We can't afford to + * be interrupted and don't want to slow down microtime(), so lock + * out interrupts in another way. + */ + outb(IO_ICU1 + 1, 0xff); microtime(&intr_timestamp); + disable_intr(); + outb(IO_ICU1 + 1, imen); + siointr(unit); } diff --git a/sys/i386/isa/sio.c b/sys/i386/isa/sio.c index 0d16b1f..13db874 100644 --- a/sys/i386/isa/sio.c +++ b/sys/i386/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.58 1994/10/23 21:27:34 wollman Exp $ + * $Id: sio.c,v 1.59 1994/11/01 23:09:29 bde Exp $ */ #include "sio.h" @@ -1022,7 +1022,16 @@ void siointrts(unit) int unit; { + /* + * XXX microtime() reenables CPU interrupts. We can't afford to + * be interrupted and don't want to slow down microtime(), so lock + * out interrupts in another way. + */ + outb(IO_ICU1 + 1, 0xff); microtime(&intr_timestamp); + disable_intr(); + outb(IO_ICU1 + 1, imen); + siointr(unit); } diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 0d16b1f..13db874 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)com.c 7.5 (Berkeley) 5/16/91 - * $Id: sio.c,v 1.58 1994/10/23 21:27:34 wollman Exp $ + * $Id: sio.c,v 1.59 1994/11/01 23:09:29 bde Exp $ */ #include "sio.h" @@ -1022,7 +1022,16 @@ void siointrts(unit) int unit; { + /* + * XXX microtime() reenables CPU interrupts. We can't afford to + * be interrupted and don't want to slow down microtime(), so lock + * out interrupts in another way. + */ + outb(IO_ICU1 + 1, 0xff); microtime(&intr_timestamp); + disable_intr(); + outb(IO_ICU1 + 1, imen); + siointr(unit); } |