svn commit: r339384 - head/sys/amd64/include

Konstantin Belousov kib at FreeBSD.org
Tue Oct 16 17:00:43 UTC 2018


Author: kib
Date: Tue Oct 16 17:00:42 2018
New Revision: 339384
URL: https://svnweb.freebsd.org/changeset/base/339384

Log:
  Add clwb().
  
  Reviewed by:	alc, markj
  Sponsored by:	The FreeBSD Foundation
  Approved by:	re (gjb)
  MFC after:	3 days
  Differential revision:	https://reviews.freebsd.org/D17070

Modified:
  head/sys/amd64/include/cpufunc.h

Modified: head/sys/amd64/include/cpufunc.h
==============================================================================
--- head/sys/amd64/include/cpufunc.h	Tue Oct 16 16:45:21 2018	(r339383)
+++ head/sys/amd64/include/cpufunc.h	Tue Oct 16 17:00:42 2018	(r339384)
@@ -116,6 +116,13 @@ clflushopt(u_long addr)
 }
 
 static __inline void
+clwb(u_long addr)
+{
+
+	__asm __volatile("clwb %0" : : "m" (*(char *)addr));
+}
+
+static __inline void
 clts(void)
 {
 


More information about the svn-src-head mailing list