1. 01 11月, 2011 1 次提交
    • C
      dma-mapping: fix sync_single_range_* DMA debugging · 07a72309
      Clemens Ladisch 提交于
      Commit 5fd75a78 (dma-mapping: remove unnecessary sync_single_range_*
      in dma_map_ops) unified not only the dma_map_ops but also the
      corresponding debug_dma_sync_* calls.  This led to spurious WARN()ings
      like the following because the DMA debug code was no longer able to detect
      the DMA buffer base address without the separate offset parameter:
      
      WARNING: at lib/dma-debug.c:911 check_sync+0xce/0x446()
      firewire_ohci 0000:04:00.0: DMA-API: device driver tries to sync DMA memory it has not allocated [device address=0x00000000cedaa400] [size=1024 bytes]
      Call Trace: ...
       [<ffffffff811326a5>] check_sync+0xce/0x446
       [<ffffffff81132ad9>] debug_dma_sync_single_for_device+0x39/0x3b
       [<ffffffffa01d6e6a>] ohci_queue_iso+0x4f3/0x77d [firewire_ohci]
       ...
      
      To fix this, unshare the sync_single_* and sync_single_range_*
      implementations so that we are able to call the correct debug_dma_sync_*
      functions.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NClemens Ladisch <clemens@ladisch.de>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      07a72309
  2. 28 5月, 2010 1 次提交
  3. 12 5月, 2010 1 次提交
  4. 10 8月, 2009 1 次提交
    • A
      dma-ops: Remove flush_write_buffers() in dma-mapping-common.h · a8ad568d
      Arnd Bergmann 提交于
      This moves flush_write_buffers() in
      asm-generic/dma-mapping-common.h to
      arch/x86/kernel/pci-nommu.c.
      
      The purpose of this patch is that, we can avoid defining NULL
      flush_write_buffers() on IA64 and SPARC.
      
      dma-mapping-common.h is used by X86 and IA64 (and SPARC soon)
      but only X86 with CONFIG_X86_OOSTORE or CONFIG_X86_PPRO_FENCE
      actually uses flush_write_buffers(). CONFIG_X86_OOSTORE or
      CONFIG_X86_PPRO_FENCE is usable with only kernel/pci-nommu.c
      (that is, not usable with other X86 IOMMU implementations such
      as SWIOTLB, VT-d, etc) so we can safely move
      flush_write_buffers() in asm-generic/dma-mapping-common.h to
      arch/x86/kernel/pci-nommu.c.
      
      The further discussion is:
      
        http://lkml.org/lkml/2009/6/28/104Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Cc: davem@davemloft.net
      Cc: tony.luck@intel.com
      Cc: fenghua.yu@intel.com
      LKML-Reference: <1249872797-1314-2-git-send-email-fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a8ad568d
  5. 19 6月, 2009 1 次提交
    • F
      dma-mapping: add asm-generic/dma-mapping-common.h · c147d8ea
      FUJITA Tomonori 提交于
      We unified x86 and IA64's handling of multiple dma mapping operations
      (struct dma_map_ops in linux/dma-mapping.h) so we can remove duplication
      in their arch/include/asm/dma-mapping.h.
      
      This patchset adds include/asm-generic/dma-mapping-common.h that provides
      some generic dma mapping function definitions for the users of struct
      dma_map_ops.  This enables us to remove about 100 lines.  This also
      enables us to easily add CONFIG_DMA_API_DEBUG support, which only x86
      supports for now.  The 4th patch adds CONFIG_DMA_API_DEBUG support to IA64
      by adding only 8 lines.
      
      This patch:
      
      This header file provides some mapping function definitions that the users
      of struct dma_map_ops can use.
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Acked-by: NJoerg Roedel <joerg.roedel@amd.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c147d8ea