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 Bogus clflushopt that just...
details: https://anonhg.NetBSD.org/src/rev/232723e8c65a
branches: trunk
changeset: 1028017:232723e8c65a
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:39:34 2021 +0000
description:
Bogus clflushopt that just does clflush for now.
diffstat:
sys/external/bsd/drm2/include/asm/processor.h | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r c9ca373036ba -r 232723e8c65a sys/external/bsd/drm2/include/asm/processor.h
--- a/sys/external/bsd/drm2/include/asm/processor.h Sun Dec 19 01:39:27 2021 +0000
+++ b/sys/external/bsd/drm2/include/asm/processor.h Sun Dec 19 01:39:34 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: processor.h,v 1.4 2021/05/31 10:33:04 riastradh Exp $ */
+/* $NetBSD: processor.h,v 1.5 2021/12/19 01:39:34 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -36,4 +36,13 @@
#define cpu_relax() DELAY(1) /* XXX */
+#if defined(__i386__) || defined(__x86_64__)
+static inline void
+clflushopt(void *p)
+{
+ /* XXX Test CPUID bit, use CLFLUSHOPT... */
+ asm volatile ("clflush %0" : : "m" (*(const char *)p));
+}
+#endif
+
#endif /* _ASM_PROCESSOR_H_ */
Home |
Main Index |
Thread Index |
Old Index