summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasao Uebayashi <uebayasi@cvs.openbsd.org>2014-10-15 15:55:43 +0000
committerMasao Uebayashi <uebayasi@cvs.openbsd.org>2014-10-15 15:55:43 +0000
commit9951467bab8dfd0733405b864ee48b0977e2253c (patch)
tree31fef5345707f449a7d54d18e0ef22dfe96e38c5
parentf281280815b3653da32b6bb90c5a48722baeaf23 (diff)
Sprinkle CPU_BUSY_CYCLE() in a few places.
OK kettenis@
-rw-r--r--sys/arch/amd64/amd64/db_interface.c4
-rw-r--r--sys/dev/ic/pckbc.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/db_interface.c b/sys/arch/amd64/amd64/db_interface.c
index 4aae2aa3252..adcc52de28d 100644
--- a/sys/arch/amd64/amd64/db_interface.c
+++ b/sys/arch/amd64/amd64/db_interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db_interface.c,v 1.20 2014/10/15 15:54:47 uebayasi Exp $ */
+/* $OpenBSD: db_interface.c,v 1.21 2014/10/15 15:55:42 uebayasi Exp $ */
/* $NetBSD: db_interface.c,v 1.1 2003/04/26 18:39:27 fvdl Exp $ */
/*
@@ -312,7 +312,7 @@ db_enter_ddb(void)
/* Busy wait without locking, we'll confirm with lock later */
while (ddb_active_cpu != cpu_number() &&
curcpu()->ci_ddb_paused != CI_DDB_RUNNING)
- ; /* Do nothing */
+ CPU_BUSY_CYCLE();
mtx_enter(&ddb_mp_mutex);
}
diff --git a/sys/dev/ic/pckbc.c b/sys/dev/ic/pckbc.c
index a8d5a0f422a..0f5e98a841f 100644
--- a/sys/dev/ic/pckbc.c
+++ b/sys/dev/ic/pckbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc.c,v 1.41 2014/10/15 15:54:47 uebayasi Exp $ */
+/* $OpenBSD: pckbc.c,v 1.42 2014/10/15 15:55:42 uebayasi Exp $ */
/* $NetBSD: pckbc.c,v 1.5 2000/06/09 04:58:35 soda Exp $ */
/*
@@ -37,6 +37,7 @@
#include <sys/lock.h>
#include <machine/bus.h>
+#include <machine/cpu.h>
#include <dev/ic/i8042reg.h>
#include <dev/ic/pckbcvar.h>
@@ -151,6 +152,7 @@ pckbc_poll_data1(bus_space_tag_t iot, bus_space_handle_t ioh_d,
register u_char c;
KBD_DELAY;
+ CPU_BUSY_CYCLE();
c = bus_space_read_1(iot, ioh_d, 0);
if (checkaux && (stat & 0x20)) { /* aux data */
if (slot != PCKBC_AUX_SLOT) {