summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-01-28 21:53:17 +0900
committerIngo Molnar <mingo@elte.hu>2009-01-29 14:39:29 +0100
commitdfb805e831cc5306b14eacd64e0b36d0d973ee0d (patch)
tree2190228a1541cb99cccd444e0e24280d24b70f7d /arch
parent97d9800de9df9c6e71b00c0a26239c7d7f6a46c4 (diff)
downloadop-kernel-dev-dfb805e831cc5306b14eacd64e0b36d0d973ee0d.zip
op-kernel-dev-dfb805e831cc5306b14eacd64e0b36d0d973ee0d.tar.gz
IA64: fix VT-d dma_mapping_error
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: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/ia64/kernel/pci-dma.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/ia64/kernel/pci-dma.c b/arch/ia64/kernel/pci-dma.c
index a647f11..e4cb443 100644
--- a/arch/ia64/kernel/pci-dma.c
+++ b/arch/ia64/kernel/pci-dma.c
@@ -99,11 +99,6 @@ int iommu_dma_supported(struct device *dev, u64 mask)
}
EXPORT_SYMBOL(iommu_dma_supported);
-static int vtd_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
-{
- return 0;
-}
-
void __init pci_iommu_alloc(void)
{
dma_ops = &intel_dma_ops;
@@ -113,7 +108,6 @@ void __init pci_iommu_alloc(void)
dma_ops->sync_single_for_device = machvec_dma_sync_single;
dma_ops->sync_sg_for_device = machvec_dma_sync_sg;
dma_ops->dma_supported = iommu_dma_supported;
- dma_ops->mapping_error = vtd_dma_mapping_error;
/*
* The order of these functions is important for
OpenPOWER on IntegriCloud