Author: luigi Date: Mon Dec 16 23:57:43 2013 New Revision: 259487 URL: http://svnweb.freebsd.org/changeset/base/259487
Log: fix the build using __builtin_prefetch() instead of redefining prefetch() Modified: head/sys/dev/netmap/ixgbe_netmap.h head/sys/dev/netmap/netmap_kern.h head/sys/dev/netmap/netmap_vale.c Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Mon Dec 16 22:26:25 2013 (r259486) +++ head/sys/dev/netmap/ixgbe_netmap.h Mon Dec 16 23:57:43 2013 (r259487) @@ -220,8 +220,8 @@ ixgbe_netmap_txsync(struct netmap_adapte if (nm_i != cur) { /* we have new packets to send */ nic_i = netmap_idx_k2n(kring, nm_i); - prefetch(&ring->slot[nm_i]); - prefetch(&txr->tx_buffers[nic_i]); + __builtin_prefetch(&ring->slot[nm_i]); + __builtin_prefetch(&txr->tx_buffers[nic_i]); for (n = 0; nm_i != cur; n++) { struct netmap_slot *slot = &ring->slot[nm_i]; @@ -237,8 +237,8 @@ ixgbe_netmap_txsync(struct netmap_adapte IXGBE_TXD_CMD_RS : 0; /* prefetch for next round */ - prefetch(&ring->slot[nm_i + 1]); - prefetch(&txr->tx_buffers[nic_i + 1]); + __builtin_prefetch(&ring->slot[nm_i + 1]); + __builtin_prefetch(&txr->tx_buffers[nic_i + 1]); NM_CHECK_ADDR_LEN(addr, len); Modified: head/sys/dev/netmap/netmap_kern.h ============================================================================== --- head/sys/dev/netmap/netmap_kern.h Mon Dec 16 22:26:25 2013 (r259486) +++ head/sys/dev/netmap/netmap_kern.h Mon Dec 16 23:57:43 2013 (r259487) @@ -61,7 +61,6 @@ #define NM_ATOMIC_TEST_AND_SET(p) (!atomic_cmpset_acq_int((p), 0, 1)) #define NM_ATOMIC_CLEAR(p) atomic_store_rel_int((p), 0) -#define prefetch(x) __builtin_prefetch(x) MALLOC_DECLARE(M_NETMAP); Modified: head/sys/dev/netmap/netmap_vale.c ============================================================================== --- head/sys/dev/netmap/netmap_vale.c Mon Dec 16 22:26:25 2013 (r259486) +++ head/sys/dev/netmap/netmap_vale.c Mon Dec 16 23:57:43 2013 (r259487) @@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$"); #include <sys/endian.h> #include <sys/refcount.h> -// #define prefetch(x) __builtin_prefetch(x) - #define BDG_RWLOCK_T struct rwlock // struct rwlock @@ -1003,7 +1001,7 @@ nm_bdg_preflush(struct netmap_vp_adapter ft[ft_i].ft_next = NM_FT_NULL; buf = ft[ft_i].ft_buf = (slot->flags & NS_INDIRECT) ? (void *)(uintptr_t)slot->ptr : BDG_NMB(&na->up, slot); - prefetch(buf); + __builtin_prefetch(buf); ++ft_i; if (slot->flags & NS_MOREFRAG) { frags++; _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"