summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-10-02 23:14:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-10-02 23:14:34 +0000
commit038262b0f4494f29379d28df360fcf91436e18cf (patch)
tree927fde0b485fd8bcb6b262b5bbe8fed39ae3119f /sys
parente4c712a2cec00ef7458522288fab74ddd6a3abd6 (diff)
Ensure the caches are wbinvd'd before we say that the cpu is not running
anymore. ok kettenis
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/amd64/ipifuncs.c3
-rw-r--r--sys/arch/i386/i386/ipifuncs.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/ipifuncs.c b/sys/arch/amd64/amd64/ipifuncs.c
index 5738f9df091..fdf6373cc9f 100644
--- a/sys/arch/amd64/amd64/ipifuncs.c
+++ b/sys/arch/amd64/amd64/ipifuncs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipifuncs.c,v 1.13 2010/07/21 14:08:09 kettenis Exp $ */
+/* $OpenBSD: ipifuncs.c,v 1.14 2010/10/02 23:14:32 deraadt Exp $ */
/* $NetBSD: ipifuncs.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */
/*-
@@ -99,6 +99,7 @@ x86_64_ipi_halt(struct cpu_info *ci)
{
SCHED_ASSERT_UNLOCKED();
disable_intr();
+ wbinvd();
ci->ci_flags &= ~CPUF_RUNNING;
wbinvd();
diff --git a/sys/arch/i386/i386/ipifuncs.c b/sys/arch/i386/i386/ipifuncs.c
index 064b3ffa242..e778070b83d 100644
--- a/sys/arch/i386/i386/ipifuncs.c
+++ b/sys/arch/i386/i386/ipifuncs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipifuncs.c,v 1.18 2010/07/21 14:08:09 kettenis Exp $ */
+/* $OpenBSD: ipifuncs.c,v 1.19 2010/10/02 23:14:33 deraadt Exp $ */
/* $NetBSD: ipifuncs.c,v 1.1.2.3 2000/06/26 02:04:06 sommerfeld Exp $ */
/*-
@@ -102,6 +102,7 @@ i386_ipi_halt(struct cpu_info *ci)
{
SCHED_ASSERT_UNLOCKED();
disable_intr();
+ wbinvd();
ci->ci_flags &= ~CPUF_RUNNING;
wbinvd();