dma-mapping: bypass indirect calls for dma-direct
Avoid expensive indirect calls in the fast path DMA mapping operations by directly calling the dma_direct_* ops if we are using the directly mapped DMA operations. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Jesper Dangaard Brouer <brouer@redhat.com> Tested-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
@@ -581,7 +581,7 @@ static int vmw_dma_select_mode(struct vmw_private *dev_priv)
|
||||
|
||||
dev_priv->map_mode = vmw_dma_map_populate;
|
||||
|
||||
if (dma_ops->sync_single_for_cpu)
|
||||
if (dma_ops && dma_ops->sync_single_for_cpu)
|
||||
dev_priv->map_mode = vmw_dma_alloc_coherent;
|
||||
#ifdef CONFIG_SWIOTLB
|
||||
if (swiotlb_nr_tbl() == 0)
|
||||
|
Reference in New Issue
Block a user