summaryrefslogtreecommitdiffstats
path: root/sys/dev/netmap
diff options
context:
space:
mode:
authorluigi <luigi@FreeBSD.org>2012-07-26 21:37:58 +0000
committerluigi <luigi@FreeBSD.org>2012-07-26 21:37:58 +0000
commit4232ec1e401d4391e25dc6c551f0b2d7c35b948c (patch)
tree884ead57a701ef6f1e24c9e1dd5021224bfa8d35 /sys/dev/netmap
parentf52de12ecb0465903477bc8401e1c58297d4e492 (diff)
downloadFreeBSD-src-4232ec1e401d4391e25dc6c551f0b2d7c35b948c.zip
FreeBSD-src-4232ec1e401d4391e25dc6c551f0b2d7c35b948c.tar.gz
define prefetch as a noop on !x86
Diffstat (limited to 'sys/dev/netmap')
-rw-r--r--sys/dev/netmap/netmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/netmap/netmap.c b/sys/dev/netmap/netmap.c
index deb550b..1698f1d 100644
--- a/sys/dev/netmap/netmap.c
+++ b/sys/dev/netmap/netmap.c
@@ -220,7 +220,11 @@ struct nm_bridge nm_bridges[NM_BRIDGES];
#ifndef linux
static inline void prefetch (const void *x)
{
+#if defined(__i386__) || defined(__amd64__)
__asm volatile("prefetcht0 %0" :: "m" (*(const unsigned long *)x));
+#else
+ (void)x;
+#endif
}
#endif /* !linux */
OpenPOWER on IntegriCloud