1. 02 12月, 2014 2 次提交
  2. 26 8月, 2014 1 次提交
  3. 21 5月, 2014 2 次提交
  4. 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
  5. 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
  6. 17 9月, 2013 1 次提交
  7. 30 8月, 2013 1 次提交
  8. 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
  9. 28 3月, 2012 3 次提交
  10. 26 3月, 2012 1 次提交
  11. 03 11月, 2011 1 次提交
  12. 20 9月, 2011 1 次提交
  13. 27 7月, 2011 1 次提交
  14. 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
  15. 23 9月, 2010 1 次提交
  16. 14 8月, 2010 1 次提交
  17. 11 8月, 2010 1 次提交
  18. 28 5月, 2010 2 次提交
  19. 13 3月, 2010 2 次提交
  20. 28 8月, 2009 1 次提交
  21. 28 7月, 2009 1 次提交
  22. 20 6月, 2009 2 次提交
  23. 07 4月, 2009 1 次提交
  24. 06 1月, 2009 1 次提交
  25. 19 9月, 2008 1 次提交
  26. 14 9月, 2008 1 次提交
  27. 10 9月, 2008 1 次提交
  28. 29 4月, 2008 1 次提交
    • A
      dma: add dma_*map*_attrs() interfaces · 74bc7cee
      Arthur Kepner 提交于
      Introduce new interfaces, dma_*map*_attrs(), for passing architecture-specific
      attributes when memory is mapped and unmapped for DMA.  Give the interfaces
      default implementations which ignore attributes.  Also introduce the
      dma_{set|get}_attr() interfaces for setting and retrieving individual
      attributes.  Define one attribute, DMA_ATTR_WRITE_BARRIER, in anticipation of
      its use by ia64/sn.  Select whether architectures implement arch-specific
      versions of the dma_*map*_attrs() interfaces via HAVE_DMA_ATTRS in Kconfig.
      
      [markn@au1.ibm.com: dma_{set,get}_attr() have to be static inline]
      Signed-off-by: NArthur Kepner <akepner@sgi.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Jes Sorensen <jes@sgi.com>
      Cc: Randy Dunlap <randy.dunlap@oracle.com>
      Cc: Roland Dreier <rdreier@cisco.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: David Miller <davem@davemloft.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Grant Grundler <grundler@parisc-linux.org>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      74bc7cee
  29. 06 2月, 2008 2 次提交
    • F
      iommu sg merging: add accessors for segment_boundary_mask in device_dma_parameters() · d22a6966
      FUJITA Tomonori 提交于
      This adds new accessors for segment_boundary_mask in device_dma_parameters
      structure in the same way I did for max_segment_size.  So we can easily change
      where to place struct device_dma_parameters in the future.
      
      dma_get_segment boundary returns 0xffffffff if dma_parms in struct device
      isn't set up properly.  0xffffffff is the default value used in the block
      layer and the scsi mid layer.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d22a6966
    • F
      iommu sg merging: add device_dma_parameters structure · 6b7b6510
      FUJITA Tomonori 提交于
      IOMMUs merges scatter/gather segments without considering a low level
      driver's restrictions. The problem is that IOMMUs can't access to the
      limitations because they are in request_queue.
      
      This patchset introduces a new structure, device_dma_parameters,
      including dma information. A pointer to device_dma_parameters is added
      to struct device. The bus specific structures (like pci_dev) includes
      device_dma_parameters. Low level drivers can use dma_set_max_seg_size
      to tell IOMMUs about the restrictions.
      
      We can move more dma stuff in struct device (like dma_mask) to struct
      device_dma_parameters later (needs some cleanups before that).
      
      This includes patches for all the IOMMUs that could merge sg (x86_64,
      ppc, IA64, alpha, sparc64, and parisc) though only the ppc patch was
      tested. The patches for other IOMMUs are only compile tested.
      
      This patch:
      
      Add a new structure, device_dma_parameters, including dma information.  A
      pointer to device_dma_parameters is added to struct device.
      
      - there are only max_segment_size and segment_boundary_mask there but we'll
        move more dma stuff in struct device (like dma_mask) to struct
        device_dma_parameters later.  segment_boundary_mask is not supported yet.
      
      - new accessors for the dma parameters are added.  So we can easily change
        where to place struct device_dma_parameters in the future.
      
      - dma_get_max_seg_size returns 64K if dma_parms in struct device isn't set
        up properly.  64K is the default max_segment_size in the block layer.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: NJeff Garzik <jeff@garzik.org>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Acked-by: NJens Axboe <jens.axboe@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6b7b6510
  30. 03 2月, 2008 1 次提交
  31. 19 10月, 2007 1 次提交