1. 30 7月, 2012 6 次提交
  2. 16 7月, 2012 1 次提交
    • P
      ARM: dma-mapping: modify condition check while freeing pages · 46c87852
      Prathyush K 提交于
      WARNING: at mm/vmalloc.c:1471 __iommu_free_buffer+0xcc/0xd0()
      Trying to vfree() nonexistent vm area (ef095000)
      Modules linked in:
      [<c0015a18>] (unwind_backtrace+0x0/0xfc) from [<c0025a94>] (warn_slowpath_common+0x54/0x64)
      [<c0025a94>] (warn_slowpath_common+0x54/0x64) from [<c0025b38>] (warn_slowpath_fmt+0x30/0x40)
      [<c0025b38>] (warn_slowpath_fmt+0x30/0x40) from [<c0016de0>] (__iommu_free_buffer+0xcc/0xd0)
      [<c0016de0>] (__iommu_free_buffer+0xcc/0xd0) from [<c0229a5c>] (exynos_drm_free_buf+0xe4/0x138)
      [<c0229a5c>] (exynos_drm_free_buf+0xe4/0x138) from [<c022b358>] (exynos_drm_gem_destroy+0x80/0xfc)
      [<c022b358>] (exynos_drm_gem_destroy+0x80/0xfc) from [<c0211230>] (drm_gem_object_free+0x28/0x34)
      [<c0211230>] (drm_gem_object_free+0x28/0x34) from [<c0211bd0>] (drm_gem_object_release_handle+0xcc/0xd8)
      [<c0211bd0>] (drm_gem_object_release_handle+0xcc/0xd8) from [<c01abe10>] (idr_for_each+0x74/0xb8)
      [<c01abe10>] (idr_for_each+0x74/0xb8) from [<c02114e4>] (drm_gem_release+0x1c/0x30)
      [<c02114e4>] (drm_gem_release+0x1c/0x30) from [<c0210ae8>] (drm_release+0x608/0x694)
      [<c0210ae8>] (drm_release+0x608/0x694) from [<c00b75a0>] (fput+0xb8/0x228)
      [<c00b75a0>] (fput+0xb8/0x228) from [<c00b40c4>] (filp_close+0x64/0x84)
      [<c00b40c4>] (filp_close+0x64/0x84) from [<c0029d54>] (put_files_struct+0xe8/0x104)
      [<c0029d54>] (put_files_struct+0xe8/0x104) from [<c002b930>] (do_exit+0x608/0x774)
      [<c002b930>] (do_exit+0x608/0x774) from [<c002bae4>] (do_group_exit+0x48/0xb4)
      [<c002bae4>] (do_group_exit+0x48/0xb4) from [<c002bb60>] (sys_exit_group+0x10/0x18)
      [<c002bb60>] (sys_exit_group+0x10/0x18) from [<c000ee80>] (ret_fast_syscall+0x0/0x30)
      
      This patch modifies the condition while freeing to match the condition
      used while allocation. This fixes the above warning which arises when
      array size is equal to PAGE_SIZE where allocation is done using kzalloc
      but free is done using vfree.
      Signed-off-by: NPrathyush K <prathyush.k@samsung.com>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      46c87852
  3. 25 6月, 2012 1 次提交
    • M
      ARM: dma-mapping: fix buffer chunk allocation order · 593f4735
      Marek Szyprowski 提交于
      IOMMU-aware dma_alloc_attrs() implementation allocates buffers in
      power-of-two chunks to improve performance and take advantage of large
      page mappings provided by some IOMMU hardware. However current code, due
      to a subtle bug, allocated those chunks in the smallest-to-largest
      order, what completely killed all the advantages of using larger than
      page chunks. If a 4KiB chunk has been mapped as a first chunk, the
      consecutive chunks are not aligned correctly to the power-of-two which
      match their size and IOMMU drivers were not able to use internal
      mappings of size other than the 4KiB (largest common denominator of
      alignment and chunk size).
      
      This patch fixes this issue by changing to the correct largest-to-smallest
      chunk size allocation sequence.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      593f4735
  4. 11 6月, 2012 1 次提交
  5. 04 6月, 2012 1 次提交
  6. 21 5月, 2012 12 次提交
  7. 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
  8. 27 11月, 2011 1 次提交
  9. 21 11月, 2011 1 次提交
  10. 26 9月, 2011 1 次提交
  11. 23 8月, 2011 1 次提交
  12. 22 8月, 2011 2 次提交
  13. 12 7月, 2011 1 次提交
  14. 22 2月, 2011 1 次提交
  15. 13 1月, 2011 1 次提交
  16. 07 1月, 2011 1 次提交
  17. 03 1月, 2011 1 次提交
  18. 20 12月, 2010 1 次提交
    • N
      ARM: get rid of kmap_high_l1_vipt() · 39af22a7
      Nicolas Pitre 提交于
      Since commit 3e4d3af5 "mm: stack based kmap_atomic()", it is no longer
      necessary to carry an ad hoc version of kmap_atomic() added in commit
      7e5a69e8 "ARM: 6007/1: fix highmem with VIPT cache and DMA" to cope
      with reentrancy.
      
      In fact, it is now actively wrong to rely on fixed kmap type indices
      (namely KM_L1_CACHE) as kmap_atomic() totally ignores them now and a
      concurrent instance of it may reuse any slot for any purpose.
      Signed-off-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      39af22a7
  19. 08 11月, 2010 1 次提交
  20. 19 9月, 2010 1 次提交
  21. 08 9月, 2010 1 次提交
    • R
      ARM: Ensure PTE modifications via dma_alloc_coherent are visible · 2be23c47
      Russell King 提交于
      Dave Hylands reports:
      | We've observed a problem with dma_alloc_writecombine when the system
      | is under heavy load (heavy bus traffic).  We've managed to reduce the
      | problem to the following snippet, which is run from a kthread in a
      | continuous loop:
      |
      |   void *virtAddr;
      |   dma_addr_t physAddr;
      |   unsigned int numBytes = 256;
      |
      |   for (;;) {
      |       virtAddr = dma_alloc_writecombine(NULL,
      |             numBytes, &physAddr, GFP_KERNEL);
      |       if (virtAddr == NULL) {
      |          printk(KERN_ERR "Running out of memory\n");
      |          break;
      |       }
      |
      |       /* access DMA memory allocated */
      |       tmp = virtAddr;
      |       *tmp = 0x77;
      |
      |       /* free DMA memory */
      |       dma_free_writecombine(NULL,
      |             numBytes, virtAddr, physAddr);
      |
      |         ...sleep here...
      |     }
      |
      | By itself, the code will run forever with no issues. However, as we
      | increase our bus traffic (typically using DMA) then the *tmp = 0x77
      | line will eventually cause a page fault. If we add a small delay (a
      | few microseconds) before the *tmp = 0x77, then we don't see a page
      | fault, even under heavy load.
      
      A dsb() is required after modifying the PTE entries to ensure that they
      will always be visible.  Add this dsb().
      Reported-by: NDave Hylands <dhylands@gmail.com>
      Tested-by: NDave Hylands <dhylands@gmail.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      2be23c47
  22. 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
  23. 01 7月, 2010 1 次提交