Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/asm Define cache_line_size() u...



details:   https://anonhg.NetBSD.org/src/rev/9ca47588694a
branches:  trunk
changeset: 992594:9ca47588694a
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:08:47 2018 +0000

description:
Define cache_line_size() using ci_cflush_lsize.

diffstat:

 sys/external/bsd/drm2/include/asm/cpufeature.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 0ff352d330ab -r 9ca47588694a sys/external/bsd/drm2/include/asm/cpufeature.h
--- a/sys/external/bsd/drm2/include/asm/cpufeature.h    Mon Aug 27 07:08:37 2018 +0000
+++ b/sys/external/bsd/drm2/include/asm/cpufeature.h    Mon Aug 27 07:08:47 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufeature.h,v 1.1 2018/08/27 07:07:45 riastradh Exp $ */
+/*     $NetBSD: cpufeature.h,v 1.2 2018/08/27 07:08:47 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -36,6 +36,11 @@
 
 #if defined(__i386__) || defined(__x86_64__)
 #define        cpu_has_clflush ISSET(cpu_info_primary.ci_feat_val[0], CPUID_CFLUSH)
+static inline size_t
+cache_line_size(void)
+{
+       return cpu_info_primary.ci_cflush_lsize;
+}
 #endif
 
 #endif /* _LINUX_ASM_CPUFEATURE_H_ */



Home | Main Index | Thread Index | Old Index