summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-31 12:17:21 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2017-01-31 12:17:21 +0000
commit6de464be544ce1b73113b5a5caa0e9d577b001ea (patch)
tree9f2d749eb79fb58e3e5534d28e9990ae875860da /sys
parentee1eb06a640d258878425ad2234f79b4c1e05285 (diff)
Issue a pause instruction in the busy-wait loop on SP kernels as well
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pv/xen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c
index 7721e2a37d9..e4036af176b 100644
--- a/sys/dev/pv/xen.c
+++ b/sys/dev/pv/xen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xen.c,v 1.72 2017/01/20 16:57:38 mikeb Exp $ */
+/* $OpenBSD: xen.c,v 1.73 2017/01/31 12:17:20 mikeb Exp $ */
/*
* Copyright (c) 2015 Mike Belopuhov
@@ -1098,7 +1098,9 @@ xen_grant_table_remove(struct xen_softc *sc, grant_ref_t ref)
ge->ge_start, ge->ge_table[ref].domid);
return;
}
- CPU_BUSY_CYCLE();
+#if (defined(__amd64__) || defined(__i386__))
+ __asm volatile("pause": : : "memory");
+#endif
}
ge->ge_table[ref].frame = 0xffffffff;
}