From owner-svn-soc-all@FreeBSD.ORG Mon May 26 17:23:52 2014 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30B1E569 for ; Mon, 26 May 2014 17:23:52 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D5402971 for ; Mon, 26 May 2014 17:23:52 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4QHNpLb034104 for ; Mon, 26 May 2014 17:23:51 GMT (envelope-from op@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.8/8.14.8/Submit) id s4QHNpOh033996 for svn-soc-all@FreeBSD.org; Mon, 26 May 2014 17:23:51 GMT (envelope-from op@FreeBSD.org) Date: Mon, 26 May 2014 17:23:51 GMT Message-Id: <201405261723.s4QHNpOh033996@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to op@FreeBSD.org using -f From: op@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r268658 - soc2014/op/freebsd-base/sys/amd64/include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 May 2014 17:23:52 -0000 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 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 but is too painful to get to */ #ifndef MSR_FSBASE