Go to the documentation of this file.
10 #ifndef _LINUX_PREFETCH_H
11 #define _LINUX_PREFETCH_H
13 #include <linux/types.h>
14 #include <asm/processor.h>
15 #include <asm/cache.h>
37 #ifndef ARCH_HAS_PREFETCH
38 #define prefetch(x) __builtin_prefetch(x)
41 #ifndef ARCH_HAS_PREFETCHW
42 #define prefetchw(x) __builtin_prefetch(x,1)
45 #ifndef ARCH_HAS_SPINLOCK_PREFETCH
46 #define spin_lock_prefetch(x) prefetchw(x)
49 #ifndef PREFETCH_STRIDE
50 #define PREFETCH_STRIDE (4*L1_CACHE_BYTES)
53 static inline void prefetch_range(
void *
addr,
size_t len)
55 #ifdef ARCH_HAS_PREFETCH
57 char *
end = addr + len;