1. 29 1月, 2009 2 次提交
    • F
      IA64: fix VT-d dma_mapping_error · dfb805e8
      FUJITA Tomonori 提交于
      dma_mapping_error is used to see if dma_map_single and dma_map_page
      succeed. IA64 VT-d dma_mapping_error always says that dma_map_single
      is successful even though it could fail. Note that X86 VT-d works
      properly in this regard.
      
      This patch fixes IA64 VT-d dma_mapping_error by adding VT-d's own
      dma_mapping_error() that works for both X86_64 and IA64. VT-d uses
      zero as an error dma address so VT-d's dma_mapping_error returns 1 if
      a passed dma address is zero (as x86's VT-d dma_mapping_error does
      now).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      dfb805e8
    • F
      IA64: fix swiotlb alloc_coherent for non DMA_64BIT_MASK devices · 97d9800d
      FUJITA Tomonori 提交于
      Before the dma ops unification, IA64 always uses GFP_DMA for
      dma_alloc_coherent like:
      
      #define dma_alloc_coherent(dev, size, handle, gfp)	\
      	platform_dma_alloc_coherent(dev, size, handle, (gfp) | GFP_DMA)
      
      This GFP_DMA enforcement doesn't make sense for IOMMUs since they can
      do address translation to give addresses that devices can access
      to. The IOMMU drivers ignore the zone flag. However, this is still
      necessary for swiotlb since it can't do address translation.
      
      We don't always need to use GFP_DMA for swiotlb. We need GFP_DMA for
      devices incapable of 64bit DMA.
      
      This patch is sorta updated version of:
      
      http://marc.info/?l=linux-kernel&m=122638215612705&w=2Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      97d9800d
  2. 27 1月, 2009 1 次提交
    • F
      IA64: fix compile error on IA64_DIG_VTD · fb446727
      FUJITA Tomonori 提交于
      This moves iommu_detected to arch/ia64/kernel/dma-mapping.c from
      arch/ia64/kernel/pci-swiotlb.c to fix the following error on on
      IA64_DIG_VTD:
      
       arch/ia64/kernel/built-in.o: In function `pci_iommu_init':
       pci-dma.c:(.init.text+0xa021): undefined reference to `iommu_detected'
       pci-dma.c:(.init.text+0xa030): undefined reference to `iommu_detected'
       drivers/built-in.o: In function `detect_intel_iommu':
       (.init.text+0x11c0): undefined reference to `iommu_detected'
       drivers/built-in.o: In function `detect_intel_iommu':
       (.init.text+0x11e1): undefined reference to `iommu_detected'
      
      iommu_detected is used to handle IOMMUs so I guess that
      arch/ia64/kernel/dma-mapping.c is ok (there might be a better place
      for it though).
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      fb446727
  3. 23 1月, 2009 1 次提交
  4. 16 1月, 2009 36 次提交