summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb/cxgb_osdep.h
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2007-03-14 16:05:39 +0000
committerkmacy <kmacy@FreeBSD.org>2007-03-14 16:05:39 +0000
commit08b5519b432285c9f8885f51366bfec0ea65cede (patch)
tree75f5140ea387bfb9aea1419b49b454dfba0672e2 /sys/dev/cxgb/cxgb_osdep.h
parentf78c9d73a438f0c487be5737469ab36691ba7a52 (diff)
downloadFreeBSD-src-08b5519b432285c9f8885f51366bfec0ea65cede.zip
FreeBSD-src-08b5519b432285c9f8885f51366bfec0ea65cede.tar.gz
define prefetch as a no-op macro for non-x86 arches
Diffstat (limited to 'sys/dev/cxgb/cxgb_osdep.h')
-rw-r--r--sys/dev/cxgb/cxgb_osdep.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/cxgb/cxgb_osdep.h b/sys/dev/cxgb/cxgb_osdep.h
index be936b6..f869583 100644
--- a/sys/dev/cxgb/cxgb_osdep.h
+++ b/sys/dev/cxgb/cxgb_osdep.h
@@ -104,22 +104,19 @@ struct t3_mbuf_hdr {
#define wmb() __asm volatile("sfence" ::: "memory")
#define smp_mb() mb()
-#define USE_PREFETCH
-#ifdef USE_PREFETCH
-#define L1_CACHE_BYTES 64
+#define L1_CACHE_BYTES 32
static __inline
void prefetch(void *x)
{
__asm volatile("prefetcht0 %0" :: "m" (*(unsigned long *)x));
}
-#else
-#define prefetch(x)
-#endif
+
#else /* !i386 && !amd64 */
#define mb()
#define rmb()
#define wmb()
#define smp_mb()
+#define prefetch(x)
#endif
#define DBG_RX (1 << 0)
static const int debug_flags = DBG_RX;
OpenPOWER on IntegriCloud