summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2013-12-06 22:56:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2013-12-06 22:56:21 +0000
commit42adbcdef5918b71700da84f7271d8ced669df6a (patch)
tree2a5ddc5871861d3f10986bcdd4dd64ca42080e40 /sys/arch/amd64/include
parentdde7b00df07d5064317db5ff355091c989d5d684 (diff)
Make clflush() flush the cache line specified by the address we pass it
instead of the cache line containing the local variable used to specify the address. Fixes the gnome corruption and hangs people have been experiencing for the last couple of months or so. ok deraadt@, mlarkin@
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/cpufunc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/amd64/include/cpufunc.h b/sys/arch/amd64/include/cpufunc.h
index 2e0001645c5..f48a3abe807 100644
--- a/sys/arch/amd64/include/cpufunc.h
+++ b/sys/arch/amd64/include/cpufunc.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpufunc.h,v 1.9 2013/10/05 16:58:30 guenther Exp $ */
+/* $OpenBSD: cpufunc.h,v 1.10 2013/12/06 22:56:20 kettenis Exp $ */
/* $NetBSD: cpufunc.h,v 1.3 2003/05/08 10:27:43 fvdl Exp $ */
/*-
@@ -267,7 +267,7 @@ wbinvd(void)
static __inline void
clflush(u_int64_t addr)
{
- __asm __volatile("clflush %0" : "+m" (addr));
+ __asm __volatile("clflush %0" : "+m" (*(volatile char *)addr));
}
static __inline void