Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Jul 2012 21:37:58 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r238818 - head/sys/dev/netmap
Message-ID:  <201207262137.q6QLbwGi028133@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Thu Jul 26 21:37:58 2012
New Revision: 238818
URL: http://svn.freebsd.org/changeset/base/238818

Log:
  define prefetch as a noop on !x86

Modified:
  head/sys/dev/netmap/netmap.c

Modified: head/sys/dev/netmap/netmap.c
==============================================================================
--- head/sys/dev/netmap/netmap.c	Thu Jul 26 20:41:36 2012	(r238817)
+++ head/sys/dev/netmap/netmap.c	Thu Jul 26 21:37:58 2012	(r238818)
@@ -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 */
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207262137.q6QLbwGi028133>