1. 23 1月, 2012 1 次提交
    • R
      ARM: add dma coherent region reporting via procfs · 45cd5290
      Russell King 提交于
      Add a new seqfile for reporting coherent DMA allocations.  This contains
      the address range, size and the function which was used to allocate
      each region, allowing these allocations to be viewed in much the same
      way as /proc/vmallocinfo.
      
      The DMA coherent region has limited space, so this allows allocation
      failures to be viewed, as well as finding out how much space is being
      used.
      
      Make sure this file is only readable by root - same as vmallocinfo - to
      prevent information leakage.
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      45cd5290
  2. 24 2月, 2011 1 次提交
    • R
      ARM: DMA: top-down allocation in DMA coherent region · 459c1517
      Russell King 提交于
      Achieve better usage of the DMA coherent region by doing top-down
      allocation rather than bottom up.  If we ask for a 128kB allocation,
      this will be aligned to 128kB and satisfied from the very bottom
      address.  If we then ask for a 600kB allocation, this will be aligned
      to 1MB, and we will have a 896kB hole.
      
      Performing top-down allocation resolves this by allocating the 128kB
      at the very top, and then the 600kB can come in below it without any
      unnecessary wastage.
      
      This problem was reported by Janusz Krzysztofik, who had 2 x 128kB +
      1 x 640kB allocations which wouldn't fit into 1MB.
      Tested-by: NJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      459c1517
  3. 27 7月, 2010 1 次提交
    • R
      ARM: DMA coherent allocator: align remapped addresses · 5bc23d32
      Russell King 提交于
      The DMA coherent remap area is used to provide an uncached mapping
      of memory for coherency with DMA engines.  Currently, we look for
      any free hole which our allocation will fit in with page alignment.
      
      However, this can lead to fragmentation of the area, and allows small
      allocations to cross L1 entry boundaries.  This is undesirable as we
      want to move towards allocating sections of memory.
      
      Align allocations according to the size, limiting the alignment between
      the page and section sizes.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5bc23d32
  4. 25 11月, 2009 1 次提交