Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1720857

refactor dma_cache_sync

From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject refactor dma_cache_sync
Date 2017-08-27 18:20 +0200
Message-ID <uj8s2-1D3-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The dma_cache_sync routines is used to flush caches for memory returned
by dma_alloc_attrs with the DMA_ATTR_NON_CONSISTENT flag (or previously
from dma_alloc_noncoherent), but the requirements for it seems to be
frequently misunderstood.  dma_cache_sync is documented to be a no-op for
allocations that do not have the DMA_ATTR_NON_CONSISTENT flag set, and
yet a lot of architectures implement it in some way despite not
implementing DMA_ATTR_NON_CONSISTENT.

This series removes a few abuses of dma_cache_sync for non-DMA API
purposes, then changes all remaining architectures that do not implement
DMA_ATTR_NON_CONSISTENT to implement dma_cache_sync as a no-op, and
then adds the struct dma_map_ops indirection we use for all other
DMA mapping operations to dma_cache_sync as well, thus removing all but
two implementations of the function.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

refactor dma_cache_sync Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 06/12] microblaze: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 02/12] mips: don't use dma_cache_sync to implement fd_cacheflush Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 05/12] ia64: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 07/12] mn10300: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 11/12] sh: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 09/12] unicore32: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 10/12] xtensa: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 08/12] powerpc: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 01/12] floppy: consolidate the dummy fd_cacheflush definition Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 03/12] frv: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
  [PATCH 12/12] dma-mapping: turn dma_cache_sync into a dma_map_ops method Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
    Re: [PATCH 12/12] dma-mapping: turn dma_cache_sync into a dma_map_ops method Geert Uytterhoeven <geert@linux-m68k.org> - 2017-08-28 08:30 +0200
  [PATCH 04/12] x86: make dma_cache_sync a no-op Christoph Hellwig <hch@lst.de> - 2017-08-27 18:20 +0200
    Re: [PATCH 04/12] x86: make dma_cache_sync a no-op Thomas Gleixner <tglx@linutronix.de> - 2017-08-31 16:10 +0200

csiph-web