diff options
author | Anton Blanchard <anton@samba.org> | 2006-06-10 23:04:39 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-15 19:31:26 +1000 |
commit | df310656c7552ae7b8252e4b3d8e300cff164b16 (patch) | |
tree | 89644b8725237c755422853d749acfb0c7a49c57 /arch/powerpc/kernel/pci_iommu.c | |
parent | ca1588e71b70534e18368a46a3aad9b25dff941d (diff) |
[POWERPC] cleanup dma_mapping_ops
For pseries IOMMU bypass I want to be able to fall back to the regular
IOMMU ops. Do this by creating a dma_mapping_ops struct, and convert
the others while at it.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_iommu.c')
-rw-r--r-- | arch/powerpc/kernel/pci_iommu.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c index 7fb4cca021b..0688b2534ac 100644 --- a/arch/powerpc/kernel/pci_iommu.c +++ b/arch/powerpc/kernel/pci_iommu.c @@ -148,13 +148,17 @@ static int pci_iommu_dma_supported(struct device *dev, u64 mask) return 1; } +struct dma_mapping_ops pci_iommu_ops = { + .alloc_coherent = pci_iommu_alloc_coherent, + .free_coherent = pci_iommu_free_coherent, + .map_single = pci_iommu_map_single, + .unmap_single = pci_iommu_unmap_single, + .map_sg = pci_iommu_map_sg, + .unmap_sg = pci_iommu_unmap_sg, + .dma_supported = pci_iommu_dma_supported, +}; + void pci_iommu_init(void) { - pci_dma_ops.alloc_coherent = pci_iommu_alloc_coherent; - pci_dma_ops.free_coherent = pci_iommu_free_coherent; - pci_dma_ops.map_single = pci_iommu_map_single; - pci_dma_ops.unmap_single = pci_iommu_unmap_single; - pci_dma_ops.map_sg = pci_iommu_map_sg; - pci_dma_ops.unmap_sg = pci_iommu_unmap_sg; - pci_dma_ops.dma_supported = pci_iommu_dma_supported; + pci_dma_ops = pci_iommu_ops; } |