From ba133ffb6d3d05f1323bc5f09cbc568eee9f3e70 Mon Sep 17 00:00:00 2001 From: bz Date: Fri, 29 Aug 2014 12:40:01 +0000 Subject: [PATCH] Properly handle prefetch only for amd64 and i386 as we do elsewhere. In general theraven is right that we should factr this out and provide a general and per-arch implementation that everything can use. MFC after: 3 days X-MFC with: r270755 --- sys/dev/ixl/i40e_osdep.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/ixl/i40e_osdep.h b/sys/dev/ixl/i40e_osdep.h index 5631b96729c..3bae1672d8e 100755 --- a/sys/dev/ixl/i40e_osdep.h +++ b/sys/dev/ixl/i40e_osdep.h @@ -137,11 +137,15 @@ struct i40e_spinlock { #define le16_to_cpu +#if defined(__amd64__) || defined(i386) static __inline void prefetch(void *x) { __asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x)); } +#else +#define prefetch(x) +#endif struct i40e_osdep { -- 2.45.0