diff --git a/xen/include/xen/prefetch.h b/xen/include/xen/prefetch.h index 8d7d3ffeb4..ba7399828e 100644 --- a/xen/include/xen/prefetch.h +++ b/xen/include/xen/prefetch.h @@ -28,24 +28,17 @@ prefetchw(x) - prefetches the cacheline at "x" for write spin_lock_prefetch(x) - prefectches the spinlock *x for taking - there is also PREFETCH_STRIDE which is the architecure-prefered + there is also PREFETCH_STRIDE which is the architecture-preferred "lookahead" size for prefetching streamed operations. */ -/* - * These cannot be do{}while(0) macros. See the mental gymnastics in - * the loop macro. - */ - #ifndef ARCH_HAS_PREFETCH -#define ARCH_HAS_PREFETCH -static inline void prefetch(const void *x) {;} +#define prefetch(x) __builtin_prefetch(x) #endif #ifndef ARCH_HAS_PREFETCHW -#define ARCH_HAS_PREFETCHW -static inline void prefetchw(const void *x) {;} +#define prefetchw(x) __builtin_prefetch(x,1) #endif #ifndef ARCH_HAS_SPINLOCK_PREFETCH