Date: Fri, 30 Oct 2015 10:02:57 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r290189 - in stable/10/sys: amd64/include i386/include Message-ID: <201510301002.t9UA2vXA065002@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Oct 30 10:02:57 2015 New Revision: 290189 URL: https://svnweb.freebsd.org/changeset/base/290189 Log: MFC r289824: Add CLFLUSHOPT instruction wrappers. MFC r290188: Fix prefix on i386. Modified: stable/10/sys/amd64/include/cpufunc.h stable/10/sys/i386/include/cpufunc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/cpufunc.h ============================================================================== --- stable/10/sys/amd64/include/cpufunc.h Fri Oct 30 09:53:33 2015 (r290188) +++ stable/10/sys/amd64/include/cpufunc.h Fri Oct 30 10:02:57 2015 (r290189) @@ -107,6 +107,13 @@ clflush(u_long addr) } static __inline void +clflushopt(u_long addr) +{ + + __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); +} + +static __inline void clts(void) { Modified: stable/10/sys/i386/include/cpufunc.h ============================================================================== --- stable/10/sys/i386/include/cpufunc.h Fri Oct 30 09:53:33 2015 (r290188) +++ stable/10/sys/i386/include/cpufunc.h Fri Oct 30 10:02:57 2015 (r290189) @@ -97,6 +97,13 @@ clflush(u_long addr) } static __inline void +clflushopt(u_long addr) +{ + + __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); +} + +static __inline void clts(void) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510301002.t9UA2vXA065002>