Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Aug 2012 17:24:53 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238972 - in head/sys: amd64/include i386/include
Message-ID:  <201208011724.q71HOrY0079458@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Wed Aug  1 17:24:53 2012
New Revision: 238972
URL: http://svn.freebsd.org/changeset/base/238972

Log:
  Add lfence().
  
  MFC after:	1 week

Modified:
  head/sys/amd64/include/cpufunc.h
  head/sys/i386/include/cpufunc.h

Modified: head/sys/amd64/include/cpufunc.h
==============================================================================
--- head/sys/amd64/include/cpufunc.h	Wed Aug  1 16:32:44 2012	(r238971)
+++ head/sys/amd64/include/cpufunc.h	Wed Aug  1 17:24:53 2012	(r238972)
@@ -290,6 +290,13 @@ popcntq(u_long mask)
 }
 
 static __inline void
+lfence(void)
+{
+
+	__asm __volatile("lfence" : : : "memory");
+}
+
+static __inline void
 mfence(void)
 {
 

Modified: head/sys/i386/include/cpufunc.h
==============================================================================
--- head/sys/i386/include/cpufunc.h	Wed Aug  1 16:32:44 2012	(r238971)
+++ head/sys/i386/include/cpufunc.h	Wed Aug  1 17:24:53 2012	(r238972)
@@ -155,6 +155,13 @@ cpu_mwait(u_long extensions, u_int hints
 }
 
 static __inline void
+lfence(void)
+{
+
+	__asm __volatile("lfence" : : : "memory");
+}
+
+static __inline void
 mfence(void)
 {
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208011724.q71HOrY0079458>