summaryrefslogtreecommitdiff
path: root/usr/src/uts/intel/asm/cpu.h
diff options
context:
space:
mode:
authorDavid Plauger <Dave.Plauger@Sun.COM>2008-12-05 18:52:13 -0800
committerDavid Plauger <Dave.Plauger@Sun.COM>2008-12-05 18:52:13 -0800
commit5c7544f740a475b813dfbc871b7c965e54df7989 (patch)
treea48978aa801ec7ea87763e5b05113b02cee1c9ec /usr/src/uts/intel/asm/cpu.h
parent7866414c22c54c30309a9b69942372196e667821 (diff)
downloadillumos-joyent-5c7544f740a475b813dfbc871b7c965e54df7989.tar.gz
6555476 pcacheset_cmp is inefficient
Diffstat (limited to 'usr/src/uts/intel/asm/cpu.h')
-rw-r--r--usr/src/uts/intel/asm/cpu.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/usr/src/uts/intel/asm/cpu.h b/usr/src/uts/intel/asm/cpu.h
index 0f285f82b1..0b2bb92ba1 100644
--- a/usr/src/uts/intel/asm/cpu.h
+++ b/usr/src/uts/intel/asm/cpu.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ASM_CPU_H
#define _ASM_CPU_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -114,6 +112,27 @@ extern __inline__ void __swapgs(void)
#endif /* !__lint && __GNUC__ */
+#if !defined(__lint) && defined(__GNUC__)
+
+#if defined(__i386) || defined(__amd64)
+
+/*
+ * prefetch 64 bytes
+ */
+
+extern __inline__ void prefetch64(caddr_t addr)
+{
+ __asm__ __volatile__(
+ "prefetcht0 (%0)"
+ "prefetcht0 32(%0)"
+ : /* no output */
+ : "r" (addr));
+}
+
+#endif /* __i386 || __amd64 */
+
+#endif /* !__lint && __GNUC__ */
+
#ifdef __cplusplus
}
#endif