1. 21 1月, 2016 2 次提交
  2. 26 6月, 2015 1 次提交
  3. 29 1月, 2013 1 次提交
    • G
      avr32: Provide dma_mmap_coherent() and dma_get_sgtable() · 2e727622
      Geert Uytterhoeven 提交于
      avr32/allmodconfig:
      
      drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_mmap’:
      drivers/media/v4l2-core/videobuf2-dma-contig.c:204: error: implicit declaration of function ‘dma_mmap_coherent’
      drivers/media/v4l2-core/videobuf2-dma-contig.c: In function ‘vb2_dc_get_base_sgt’:
      drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function ‘dma_get_sgtable’
      
      For architectures using dma_map_ops, dma_mmap_coherent() and
      dma_get_sgtable() are provided in <asm-generic/dma-mapping-common.h>.
      
      Avr32 does not use dma_map_ops, hence it should implement them as inline
      stubs using dma_common_mmap() and dma_common_get_sgtable().
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Acked-by: NHans-Christian Egtvedt <egtvedt@samfundet.no>
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      2e727622
  4. 11 8月, 2010 2 次提交
  5. 05 8月, 2008 1 次提交
  6. 27 7月, 2008 1 次提交
    • F
      dma-mapping: add the device argument to dma_mapping_error() · 8d8bb39b
      FUJITA Tomonori 提交于
      Add per-device dma_mapping_ops support for CONFIG_X86_64 as POWER
      architecture does:
      
      This enables us to cleanly fix the Calgary IOMMU issue that some devices
      are not behind the IOMMU (http://lkml.org/lkml/2008/5/8/423).
      
      I think that per-device dma_mapping_ops support would be also helpful for
      KVM people to support PCI passthrough but Andi thinks that this makes it
      difficult to support the PCI passthrough (see the above thread).  So I
      CC'ed this to KVM camp.  Comments are appreciated.
      
      A pointer to dma_mapping_ops to struct dev_archdata is added.  If the
      pointer is non NULL, DMA operations in asm/dma-mapping.h use it.  If it's
      NULL, the system-wide dma_ops pointer is used as before.
      
      If it's useful for KVM people, I plan to implement a mechanism to register
      a hook called when a new pci (or dma capable) device is created (it works
      with hot plugging).  It enables IOMMUs to set up an appropriate
      dma_mapping_ops per device.
      
      The major obstacle is that dma_mapping_error doesn't take a pointer to the
      device unlike other DMA operations.  So x86 can't have dma_mapping_ops per
      device.  Note all the POWER IOMMUs use the same dma_mapping_error function
      so this is not a problem for POWER but x86 IOMMUs use different
      dma_mapping_error functions.
      
      The first patch adds the device argument to dma_mapping_error.  The patch
      is trivial but large since it touches lots of drivers and dma-mapping.h in
      all the architecture.
      
      This patch:
      
      dma_mapping_error() doesn't take a pointer to the device unlike other DMA
      operations.  So we can't have dma_mapping_ops per device.
      
      Note that POWER already has dma_mapping_ops per device but all the POWER
      IOMMUs use the same dma_mapping_error function.  x86 IOMMUs use device
      argument.
      
      [akpm@linux-foundation.org: fix sge]
      [akpm@linux-foundation.org: fix svc_rdma]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix bnx2x]
      [akpm@linux-foundation.org: fix s2io]
      [akpm@linux-foundation.org: fix pasemi_mac]
      [akpm@linux-foundation.org: fix sdhci]
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix sparc]
      [akpm@linux-foundation.org: fix ibmvscsi]
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Muli Ben-Yehuda <muli@il.ibm.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Avi Kivity <avi@qumranet.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d8bb39b
  7. 24 10月, 2007 1 次提交
    • H
      AVR32: Fix sg_page breakage · 18ccc419
      Haavard Skinnemoen 提交于
      The latest sg changes introduce the following build errors on AVR32:
      
      include/asm/dma-mapping.h: In function ‘dma_map_sg’:
      include/asm/dma-mapping.h:220: error: implicit declaration of function ‘sg_page’
      include/asm/dma-mapping.h:220: error: invalid operands to binary -
      include/asm/dma-mapping.h:221: error: implicit declaration of function ‘sg_virt’
      include/asm/dma-mapping.h:221: warning: assignment makes pointer from integer without a cast
      include/asm/dma-mapping.h: In function ‘dma_sync_sg_for_device’:
      include/asm/dma-mapping.h:330: warning: passing argument 2 of ‘dma_cache_sync’ makes pointer from integer without a cast
      
      Fix it by including the correct header file, i.e. linux/scatterlist.h
      instead of asm/scatterlist.h.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      18ccc419
  8. 23 10月, 2007 1 次提交
  9. 11 10月, 2007 1 次提交
    • H
      [AVR32] Make dma_sync_*_for_cpu no-ops · b5a8e736
      Haavard Skinnemoen 提交于
      I don't think the dma_sync_*_for_cpu ever did anything useful. We
      flush the relevant cache lines when mapping the buffer or when calling
      dma_sync_*_for_device(), and the CPU isn't allowed to touch the buffer
      after that.
      
      In other words, if these functions actually have anything to flush
      from the caches, we're already in trouble.
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      b5a8e736
  10. 07 3月, 2007 1 次提交
    • G
      avr32: dma-mapping.h · a9e28d9b
      Gary Zambrano 提交于
      Added dma_sync_single_range_for_cpu/device to dma-mapping.h in asm-avr32 to
      call dma_sync_single_for_cpu/device.  This patch enables b44 to compile on
      systems with these cpus.  This patch was created with the assumption that
      another method of dma_sync_single_range_for_cpu/device does not exist on these
      architectures.
      
      Signed-off by: Gary Zambrano <zambrano@broadcom.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NHaavard Skinnemoen <hskinnemoen@atmel.com>
      a9e28d9b
  11. 09 2月, 2007 1 次提交
  12. 08 12月, 2006 3 次提交
  13. 26 9月, 2006 1 次提交