]> git.baikalelectronics.ru Git - kernel.git/commit
sh: make dma_cache_sync a no-op
authorChristoph Hellwig <hch@lst.de>
Sun, 27 Aug 2017 08:35:40 +0000 (10:35 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 19 Oct 2017 14:37:44 +0000 (16:37 +0200)
commitc4022f4029397cef4225c2f40bcb8146b03d03ac
treea683b944a85576069343932bd4fe2fa78284074a
parente30b4523340c061ad70e62dbc10fd1105370398c
sh: make dma_cache_sync a no-op

sh does not implement DMA_ATTR_NON_CONSISTENT allocations, so it doesn't
make any sense to do any work in dma_cache_sync given that it
must be a no-op when dma_alloc_attrs returns coherent memory.

On the other hand sh uses dma_cache_sync internally in the dma_ops
implementation and for the maple bus that does not use the DMA API,
so a the old functionality for dma_cache_sync is still provided under
the name sh_sync_dma_for_device, and without the redundant dev
argument.  While at it two of the syncing dma_ops also go the proper
_for_device postfix.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
arch/sh/include/asm/dma-mapping.h
arch/sh/kernel/dma-nommu.c
arch/sh/mm/consistent.c
drivers/sh/maple/maple.c