Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 May 2014 17:23:51 GMT
From:      op@FreeBSD.org
To:        svn-soc-all@FreeBSD.org
Subject:   socsvn commit: r268658 - soc2014/op/freebsd-base/sys/amd64/include
Message-ID:  <201405261723.s4QHNpOh033996@socsvn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: op
Date: Mon May 26 17:23:51 2014
New Revision: 268658
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=268658

Log:
  added stac() and clac() to cpufunc.h
  
  Signed-off-by: Oliver Pinter <oliver.pntr@gmail.com>
  
  

Modified:
  soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h

Modified: soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h
==============================================================================
--- soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h	Mon May 26 17:23:20 2014	(r268657)
+++ soc2014/op/freebsd-base/sys/amd64/include/cpufunc.h	Mon May 26 17:23:51 2014	(r268658)
@@ -587,6 +587,23 @@
 	__asm __volatile("mwait" : : "a" (hints), "c" (extensions));
 }
 
+/*
+ * Intel SMAP related functions.
+ */
+static __inline void
+clac(void)
+{
+
+	__asm __volatile("clac" : : : "memory");
+}
+
+static __inline void
+stac(void)
+{
+
+	__asm __volatile("stac" : : : "memory");
+}
+
 #ifdef _KERNEL
 /* This is defined in <machine/specialreg.h> but is too painful to get to */
 #ifndef	MSR_FSBASE



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