Date: Fri, 23 Oct 2015 11:45:38 +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: r289824 - in head/sys: amd64/include i386/include Message-ID: <201510231145.t9NBjcrP050184@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Oct 23 11:45:38 2015 New Revision: 289824 URL: https://svnweb.freebsd.org/changeset/base/289824 Log: Add CLFLUSHOPT instruction wrappers. Sponsored by: The FreeBSD Foundation 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 Fri Oct 23 11:43:56 2015 (r289823) +++ head/sys/amd64/include/cpufunc.h Fri Oct 23 11:45:38 2015 (r289824) @@ -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: head/sys/i386/include/cpufunc.h ============================================================================== --- head/sys/i386/include/cpufunc.h Fri Oct 23 11:43:56 2015 (r289823) +++ head/sys/i386/include/cpufunc.h Fri Oct 23 11:45:38 2015 (r289824) @@ -86,6 +86,13 @@ clflush(u_long addr) } static __inline void +clflushopt(u_long addr) +{ + + __asm __volatile(".byte 66;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?201510231145.t9NBjcrP050184>