1. 21 1月, 2016 3 次提交
    • G
      dma-mapping: use offset_in_page macro · 8e99469a
      Geliang Tang 提交于
      Use offset_in_page macro instead of (addr & ~PAGE_MASK).
      Signed-off-by: NGeliang Tang <geliangtang@163.com>
      Acked-by: NWill Deacon <will.deacon@arm.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8e99469a
    • C
      dma-mapping: remove <asm-generic/dma-coherent.h> · 20d666e4
      Christoph Hellwig 提交于
      This wasn't an asm-generic header to start with, and can be merged into
      dma-mapping.h trivially.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      20d666e4
    • C
      dma-mapping: always provide the dma_map_ops based implementation · e1c7e324
      Christoph Hellwig 提交于
      Move the generic implementation to <linux/dma-mapping.h> now that all
      architectures support it and remove the HAVE_DMA_ATTR Kconfig symbol now
      that everyone supports them.
      
      [valentinrothberg@gmail.com: remove leftovers in Kconfig]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
      Cc: Chris Metcalf <cmetcalf@ezchip.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Helge Deller <deller@gmx.de>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com>
      Cc: Ley Foon Tan <lftan@altera.com>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Steven Miao <realmz6@gmail.com>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e1c7e324
  2. 07 11月, 2015 1 次提交
    • R
      dma-mapping: tidy up dma_parms default handling · 002edb6f
      Robin Murphy 提交于
      Many DMA controllers and other devices set max_segment_size to
      indicate their scatter-gather capability, but have no interest in
      segment_boundary_mask. However, the existence of a dma_parms structure
      precludes the use of any default value, leaving them as zeros (assuming
      a properly kzalloc'ed structure). If a well-behaved IOMMU (or SWIOTLB)
      then tries to respect this by ensuring a mapped segment does not cross
      a zero-byte boundary, hilarity ensues.
      
      Since zero is a nonsensical value for either parameter, treat it as an
      indicator for "default", as might be expected. In the process, clean up
      a bit by replacing the bare constants with slightly more meaningful
      macros and removing the superfluous "else" statements.
      
      [akpm@linux-foundation.org: dma-mapping.h needs sizes.h for SZ_64K]
      Signed-off-by: NRobin Murphy <robin.murphy@arm.com>
      Reviewed-by: NSumit Semwal <sumit.semwal@linaro.org>
      Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Sakari Ailus <sakari.ailus@iki.fi>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      002edb6f
  3. 09 3月, 2015 1 次提交
  4. 02 12月, 2014 2 次提交
  5. 26 8月, 2014 1 次提交
  6. 21 5月, 2014 2 次提交
  7. 07 5月, 2014 1 次提交
    • S
      of: configure the platform device dma parameters · 591c1ee4
      Santosh Shilimkar 提交于
      Retrieve DMA configuration from DT and setup platform device's DMA
      parameters. The DMA configuration in DT has to be specified using
      "dma-ranges" and "dma-coherent" properties if supported.
      
      We setup dma_pfn_offset using "dma-ranges" and dma_coherent_ops
      using "dma-coherent" device tree properties.
      
      The set_arch_dma_coherent_ops macro has to be defined by arch if
      it supports coherent dma_ops. Otherwise, set_arch_dma_coherent_ops() is
      declared as nop.
      
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Grant Likely <grant.likely@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Reviewed-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      591c1ee4
  8. 31 10月, 2013 2 次提交
    • S
      ARM: 7795/1: mm: dma-mapping: Add dma_max_pfn(dev) helper function · 00c8f162
      Santosh Shilimkar 提交于
      Most of the kernel assumes that PFN0 is the start of the physical
      memory (RAM). This assumptions is not true on most of the ARM SOCs
      and hence and if one try to update the ARM port to follow the assumptions,
      we end of breaking the dma bounce limit for few block layer drivers.
      One such example is trying to unify the meaning of max*_pfn on ARM
      as the bootmem layer expects, breaks few block layer driver dma
      bounce limit.
      
      To fix this problem, we introduce dma_max_pfn(dev) generic helper with
      a possibility of override from the architecture code. The helper converts
      a DMA bitmask of bits to a block PFN number. In all the generic cases,
      it is just  "dev->dma_mask >> PAGE_SHIFT" and hence default behavior
      is maintained as is.
      
      Subsequent patches will make use of the helper. No functional change.
      
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NSantosh Shilimkar <santosh.shilimkar@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      00c8f162
    • R
      DMA-API: provide a helper to setup DMA masks · fa6a8d6d
      Russell King 提交于
      Many drivers contain code such as:
      
      	dev->dma_mask = &dev->coherent_dma_mask;
      	dev->coherent_dma_mask = MASK;
      
      Let's move this pattern out of drivers and have the DMA API provide a
      helper for it.  This helper uses dma_set_mask_and_coherent() to allow
      platform issues to be properly dealt with via dma_set_mask()/
      dma_is_supported().
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      fa6a8d6d
  9. 17 9月, 2013 1 次提交
  10. 30 8月, 2013 1 次提交
  11. 30 7月, 2012 1 次提交
    • M
      common: dma-mapping: introduce dma_get_sgtable() function · d2b7428e
      Marek Szyprowski 提交于
      This patch adds dma_get_sgtable() function which is required to let
      drivers to share the buffers allocated by DMA-mapping subsystem. Right
      now the driver gets a dma address of the allocated buffer and the kernel
      virtual mapping for it. If it wants to share it with other device (= map
      into its dma address space) it usually hacks around kernel virtual
      addresses to get pointers to pages or assumes that both devices share
      the DMA address space. Both solutions are just hacks for the special
      cases, which should be avoided in the final version of buffer sharing.
      
      To solve this issue in a generic way, a new call to DMA mapping has been
      introduced - dma_get_sgtable(). It allocates a scatter-list which
      describes the allocated buffer and lets the driver(s) to use it with
      other device(s) by calling dma_map_sg() on it.
      
      This patch provides a generic implementation based on virt_to_page()
      call. Architectures which require more sophisticated translation might
      provide their own get_sgtable() methods.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d2b7428e
  12. 28 3月, 2012 3 次提交
  13. 26 3月, 2012 1 次提交
  14. 03 11月, 2011 1 次提交
  15. 20 9月, 2011 1 次提交
  16. 27 7月, 2011 1 次提交
  17. 22 6月, 2011 1 次提交
    • A
      net: remove mm.h inclusion from netdevice.h · b7f080cf
      Alexey Dobriyan 提交于
      Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually).
      
      To prevent mm.h inclusion via other channels also extract "enum dma_data_direction"
      definition into separate header. This tiny piece is what gluing netdevice.h with mm.h
      via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h".
      Removal of mm.h from scatterlist.h was tried and was found not feasible
      on most archs, so the link was cutoff earlier.
      
      Hope people are OK with tiny include file.
      
      Note, that mm_types.h is still dragged in, but it is a separate story.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b7f080cf
  18. 23 9月, 2010 1 次提交
  19. 14 8月, 2010 1 次提交
  20. 11 8月, 2010 1 次提交
  21. 28 5月, 2010 2 次提交
  22. 13 3月, 2010 2 次提交
  23. 28 8月, 2009 1 次提交
  24. 28 7月, 2009 1 次提交
  25. 20 6月, 2009 2 次提交
  26. 07 4月, 2009 1 次提交
  27. 06 1月, 2009 1 次提交
  28. 19 9月, 2008 1 次提交
  29. 14 9月, 2008 1 次提交
  30. 10 9月, 2008 1 次提交