summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1994-11-06 00:23:45 +0000
committerbde <bde@FreeBSD.org>1994-11-06 00:23:45 +0000
commit45ffea91d2361560e5c68083a022897e3878fa35 (patch)
tree8e0327004014fd530fdc883e7bd67e0018b0ab91
parente9219cbad824a63d0c82c9541ca2b29364bb82e0 (diff)
downloadFreeBSD-src-45ffea91d2361560e5c68083a022897e3878fa35.zip
FreeBSD-src-45ffea91d2361560e5c68083a022897e3878fa35.tar.gz
Work around microtime() enabling interrupts.
-rw-r--r--sys/dev/sio/sio.c11
-rw-r--r--sys/i386/isa/sio.c11
-rw-r--r--sys/isa/sio.c11
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);
}
OpenPOWER on IntegriCloud