socsvn commit: r268658 - soc2014/op/freebsd-base/sys/amd64/include
op at FreeBSD.org
op at FreeBSD.org
Mon May 26 17:23:52 UTC 2014
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 at 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
More information about the svn-soc-all
mailing list