History

net: ethernet: altera: TSE: Remove unneeded dma sync for tx buffers

An explicit dma sync for device directly after mapping as well as an explicit dma sync for cpu directly before unmapping is unnecessary and costly on the hotpath. So remove these calls.

Lino Sanfilippo committed 9 years ago

Commit 151a14d1 parent d262fd11 file · +0 −10Browse files

Unified · Split

drivers/net/ethernet/altera/altera_tse_main.c+0−10
@@ -400,12 +400,6 @@ static int tse_rx(struct altera_tse_private *priv, int limit) · 399 unmodified lines
400400
401401 skb_put(skb, pktlength);
402402
403− /* make cache consistent with receive packet buffer */
404− dma_sync_single_for_cpu(priv->device,
405− priv->rx_ring[entry].dma_addr,
406− priv->rx_ring[entry].len,
407− DMA_FROM_DEVICE);
408−
409403 dma_unmap_single(priv->device, priv->rx_ring[entry].dma_addr,
410404 priv->rx_ring[entry].len, DMA_FROM_DEVICE);
411405
@@ -592,10 +586,6 @@ static int tse_start_xmit(struct sk_buff *skb, struct net_device *dev) · 180 unmodified lines
592586 buffer->dma_addr = dma_addr;
593587 buffer->len = nopaged_len;
594588
595− /* Push data out of the cache hierarchy into main memory */
596− dma_sync_single_for_device(priv->device, buffer->dma_addr,
597− buffer->len, DMA_TO_DEVICE);
598−
599589 priv->dmaops->tx_buffer(priv, buffer);
600590
601591 skb_tx_timestamp(skb);