aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2007-10-19 14:35:04 -0400
committerThomas Gleixner <tglx@linutronix.de>2007-10-19 14:35:04 -0400
commitab483570a13be2a34c0502b166df8f8b26802103 (patch)
tree6f9997b9313227b25faf28d67fe6e06d001022cc /include/linux
parent124d395fd05efb65d00ca23c7bcc86c272bd8813 (diff)
x86 & generic: change to __builtin_prefetch()
gcc 3.2+ supports __builtin_prefetch, so it's possible to use it on all architectures. Change the generic fallback in linux/prefetch.h to use it instead of noping it out. gcc should do the right thing when the architecture doesn't support prefetching Undefine the x86-64 inline assembler version and use the fallback. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/prefetch.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h
index 1adfe668d031..af7c36a5a521 100644
--- a/include/linux/prefetch.h
+++ b/include/linux/prefetch.h
@@ -34,17 +34,12 @@
34 34
35*/ 35*/
36 36
37/*
38 * These cannot be do{}while(0) macros. See the mental gymnastics in
39 * the loop macro.
40 */
41
42#ifndef ARCH_HAS_PREFETCH 37#ifndef ARCH_HAS_PREFETCH
43static inline void prefetch(const void *x) {;} 38#define prefetch(x) __builtin_prefetch(x)
44#endif 39#endif
45 40
46#ifndef ARCH_HAS_PREFETCHW 41#ifndef ARCH_HAS_PREFETCHW
47static inline void prefetchw(const void *x) {;} 42#define prefetchw(x) __builtin_prefetch(x,1)
48#endif 43#endif
49 44
50#ifndef ARCH_HAS_SPINLOCK_PREFETCH 45#ifndef ARCH_HAS_SPINLOCK_PREFETCH