1. 20 Sep, 2018 3 commits
    • Christoph Hellwig's avatar
      dma-mapping: consolidate the dma mmap implementations · 58b04406
      Christoph Hellwig authored
      The only functional differences (modulo a few missing fixes in the arch
      code) is that architectures without coherent caches need a hook to
      convert a virtual or dma address into a pfn, given that we don't have
      the kernel linear mapping available for the otherwise easy virt_to_page
      call.  As a side effect we can support mmap of the per-device coherent
      area even on architectures not providing the callback, and we make
      previous dangerous default methods dma_common_mmap actually save for
      non-coherent architectures by rejecting it without the right helper.
      
      In addition to that we need a hook so that some architectures can
      override the protection bits when mmaping a dma coherent allocations.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: Paul Burton <paul.burton@mips.com> # MIPS parts
      58b04406
    • Christoph Hellwig's avatar
      dma-mapping: merge direct and noncoherent ops · bc3ec75d
      Christoph Hellwig authored
      All the cache maintainance is already stubbed out when not enabled,
      but merging the two allows us to nicely handle the case where
      cache maintainance is required for some devices, but not others.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: Paul Burton <paul.burton@mips.com> # MIPS parts
      bc3ec75d
    • Christoph Hellwig's avatar
      dma-mapping: move the dma_coherent flag to struct device · f3ecc0ff
      Christoph Hellwig authored
      Various architectures support both coherent and non-coherent dma on a
      per-device basis.  Move the dma_noncoherent flag from the mips archdata
      field to struct device proper to prepare the infrastructure for reuse on
      other architectures.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarPaul Burton <paul.burton@mips.com>
      Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f3ecc0ff
  2. 24 Jun, 2018 1 commit
  3. 19 May, 2018 1 commit