1. 14 4月, 2009 1 次提交
  2. 23 1月, 2009 1 次提交
  3. 11 1月, 2009 1 次提交
  4. 06 1月, 2009 4 次提交
  5. 03 1月, 2009 1 次提交
    • R
      swiotlb: add missing __init annotations · 79ff56eb
      Roland Dreier 提交于
      Impact: cleanup, reduce kernel size a bit
      
      The current kernel build warns:
      
          WARNING: vmlinux.o(.text+0x11458): Section mismatch in reference from the function swiotlb_alloc_boot() to the function .init.text:__alloc_bootmem_low()
          The function swiotlb_alloc_boot() references
          the function __init __alloc_bootmem_low().
          This is often because swiotlb_alloc_boot lacks a __init
          annotation or the annotation of __alloc_bootmem_low is wrong.
      
          WARNING: vmlinux.o(.text+0x1011f2): Section mismatch in reference from the function swiotlb_late_init_with_default_size() to the function .init.text:__alloc_bootmem_low()
          The function swiotlb_late_init_with_default_size() references
          the function __init __alloc_bootmem_low().
          This is often because swiotlb_late_init_with_default_size lacks a __init
          annotation or the annotation of __alloc_bootmem_low is wrong.
      
      and indeed the functions calling __alloc_bootmem_low() can be marked
      __init as well.
      Signed-off-by: NRoland Dreier <rolandd@cisco.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      79ff56eb
  6. 28 12月, 2008 1 次提交
  7. 18 12月, 2008 4 次提交
  8. 24 10月, 2008 1 次提交
    • F
      x86: restore the old swiotlb alloc_coherent behavior · 03967c52
      FUJITA Tomonori 提交于
      This restores the old swiotlb alloc_coherent behavior (before the
      alloc_coherent rewrite):
      
        http://lkml.org/lkml/2008/8/12/200
      
      The old alloc_coherent avoids GFP_DMA allocation first and if the
      allocated address is not fit for the device's coherent_dma_mask, then
      dma_alloc_coherent does GFP_DMA allocation. If it fails,
      alloc_coherent calls swiotlb_alloc_coherent (in short, we rarely used
      swiotlb_alloc_coherent).
      
      After the alloc_coherent rewrite, dma_alloc_coherent
      (include/asm-x86/dma-mapping.h) directly calls swiotlb_alloc_coherent.
      It means that we possibly can't handle a device having dma_masks >
      24bit < 32bits since swiotlb_alloc_coherent doesn't have the above
      GFP_DMA retry mechanism.
      
      This patch fixes x86's swiotlb alloc_coherent to use the GFP_DMA retry
      mechanism, which dma_generic_alloc_coherent() provides now
      (pci-nommu.c and GART IOMMU driver also use
      dma_generic_alloc_coherent).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      03967c52
  9. 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
  10. 11 7月, 2008 1 次提交
  11. 08 7月, 2008 1 次提交
  12. 20 4月, 2008 1 次提交
  13. 30 1月, 2008 1 次提交
  14. 30 10月, 2007 1 次提交
  15. 11 10月, 2007 2 次提交
  16. 22 7月, 2007 1 次提交
  17. 03 5月, 2007 1 次提交
  18. 06 2月, 2007 1 次提交
  19. 30 9月, 2006 1 次提交
  20. 30 7月, 2006 1 次提交
  21. 27 6月, 2006 1 次提交
  22. 05 2月, 2006 1 次提交
    • J
      [PATCH] x86_64: IOMMU printk cleanup · 5b7b644c
      Jon Mason 提交于
      This patch contains a printk reorder to remove the current problem of
      displaying "PCI-DMA: Disabling IOMMU." and then "PCI-DMA: using GART
      IOMMU" 20 lines later in dmesg.
      
      It also constains a printk reorder in swiotlb to state swiotlb
      enablement prior to describing the location of the bounce buffers, and a
      printk reorder to state gart enablement prior to describing the
      aperature.
      
      Also constains a whitespace cleanup in arch/x86_64/kernel/setup.c
      
      Tested (along with patch 2/2) on dual opteron with gart enabled,
      iommu=soft, and iommu=off.
      Signed-off-by: NJon Mason <jdmason@us.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5b7b644c
  23. 12 1月, 2006 1 次提交
    • M
      [PATCH] x86_64: Use function pointers to call DMA mapping functions · 17a941d8
      Muli Ben-Yehuda 提交于
      AK: I hacked Muli's original patch a lot and there were a lot
      of changes - all bugs are probably to blame on me now.
      There were also some changes in the fall back behaviour
      for swiotlb - in particular it doesn't try to use GFP_DMA
      now anymore. Also all DMA mapping operations use the
      same core dma_alloc_coherent code with proper fallbacks now.
      And various other changes and cleanups.
      
      Known problems: iommu=force swiotlb=force together breaks
                      needs more testing.
      
      This patch cleans up x86_64's DMA mapping dispatching code. Right now
      we have three possible IOMMU types: AGP GART, swiotlb and nommu, and
      in the future we will also have Xen's x86_64 swiotlb and other HW
      IOMMUs for x86_64. In order to support all of them cleanly, this
      patch:
      
      - introduces a struct dma_mapping_ops with function pointers for each
        of the DMA mapping operations of gart (AMD HW IOMMU), swiotlb
        (software IOMMU) and nommu (no IOMMU).
      
      - gets rid of:
      
        if (swiotlb)
            return swiotlb_xxx();
      
      - PCI_DMA_BUS_IS_PHYS is now checked against the dma_ops being set
      This makes swiotlb faster by avoiding double copying in some cases.
      Signed-Off-By: NMuli Ben-Yehuda <mulix@mulix.org>
      Signed-Off-By: NJon D. Mason <jdmason@us.ibm.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      17a941d8