summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-03 09:45:44 -0200
committerRenato Botelho <renato@netgate.com>2015-11-03 09:45:44 -0200
commitc7275b999acdea9746ff095cf10188b4a3d09b7a (patch)
treea95eeaad8a2157ed3641d93c98bdc108bcd728d4 /sys/amd64
parent2b0a9fbf7a64ff2e54d03cebd5bc2d787026eaf8 (diff)
parentfe49fc6e1c94b6c41d1d3844ca219a76da3c70dc (diff)
downloadFreeBSD-src-c7275b999acdea9746ff095cf10188b4a3d09b7a.zip
FreeBSD-src-c7275b999acdea9746ff095cf10188b4a3d09b7a.tar.gz
Merge branch 'stable/10' into devel
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/include/cpufunc.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/amd64/include/cpufunc.h b/sys/amd64/include/cpufunc.h
index 5f8197b..a3d82e8 100644
--- a/sys/amd64/include/cpufunc.h
+++ b/sys/amd64/include/cpufunc.h
@@ -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)
{
@@ -154,6 +161,14 @@ ffsl(long mask)
return (mask == 0 ? mask : (int)bsfq((u_long)mask) + 1);
}
+#define HAVE_INLINE_FFSLL
+
+static __inline int
+ffsll(long long mask)
+{
+ return (ffsl((long)mask));
+}
+
#define HAVE_INLINE_FLS
static __inline int
@@ -170,6 +185,14 @@ flsl(long mask)
return (mask == 0 ? mask : (int)bsrq((u_long)mask) + 1);
}
+#define HAVE_INLINE_FLSLL
+
+static __inline int
+flsll(long long mask)
+{
+ return (flsl((long)mask));
+}
+
#endif /* _KERNEL */
static __inline void
OpenPOWER on IntegriCloud