aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/pci-swiotlb.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2009-01-05 09:36:11 -0500
committerIngo Molnar <mingo@elte.hu>2009-01-06 08:06:49 -0500
commitc82e4417ace9a3a4dddf3332379c771c41040040 (patch)
treeef832180990c759624a2487bcf74aa30e4e362b2 /arch/ia64/kernel/pci-swiotlb.c
parentb4391dd11df6214ad4c11706a3a606926e86a6ce (diff)
add dma_mapping_ops for SWIOTLB
There is already dma_mapping_ops for SWIOTLB but there are some missing hooks. This is for IA64_DIG_VTD, IA64_HP_ZX1_SWIOTLB, IA64_SGI_UV, IA64_HP_SIM, IA64_XEN_GUEST and IA64_GENERIC. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/ia64/kernel/pci-swiotlb.c')
-rw-r--r--arch/ia64/kernel/pci-swiotlb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/ia64/kernel/pci-swiotlb.c b/arch/ia64/kernel/pci-swiotlb.c
index 16c50516dbc..b62fb932b99 100644
--- a/arch/ia64/kernel/pci-swiotlb.c
+++ b/arch/ia64/kernel/pci-swiotlb.c
@@ -13,12 +13,18 @@
13int swiotlb __read_mostly; 13int swiotlb __read_mostly;
14EXPORT_SYMBOL(swiotlb); 14EXPORT_SYMBOL(swiotlb);
15 15
16/* Set this to 1 if there is a HW IOMMU in the system */
17int iommu_detected __read_mostly;
18
16struct dma_mapping_ops swiotlb_dma_ops = { 19struct dma_mapping_ops swiotlb_dma_ops = {
17 .mapping_error = swiotlb_dma_mapping_error,
18 .alloc_coherent = swiotlb_alloc_coherent, 20 .alloc_coherent = swiotlb_alloc_coherent,
19 .free_coherent = swiotlb_free_coherent, 21 .free_coherent = swiotlb_free_coherent,
20 .map_single = swiotlb_map_single, 22 .map_single = swiotlb_map_single,
21 .unmap_single = swiotlb_unmap_single, 23 .unmap_single = swiotlb_unmap_single,
24 .map_single_attrs = swiotlb_map_single_attrs,
25 .unmap_single_attrs = swiotlb_unmap_single_attrs,
26 .map_sg_attrs = swiotlb_map_sg_attrs,
27 .unmap_sg_attrs = swiotlb_unmap_sg_attrs,
22 .sync_single_for_cpu = swiotlb_sync_single_for_cpu, 28 .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
23 .sync_single_for_device = swiotlb_sync_single_for_device, 29 .sync_single_for_device = swiotlb_sync_single_for_device,
24 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu, 30 .sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
@@ -28,6 +34,7 @@ struct dma_mapping_ops swiotlb_dma_ops = {
28 .map_sg = swiotlb_map_sg, 34 .map_sg = swiotlb_map_sg,
29 .unmap_sg = swiotlb_unmap_sg, 35 .unmap_sg = swiotlb_unmap_sg,
30 .dma_supported_op = swiotlb_dma_supported, 36 .dma_supported_op = swiotlb_dma_supported,
37 .mapping_error = swiotlb_dma_mapping_error,
31}; 38};
32 39
33void __init pci_swiotlb_init(void) 40void __init pci_swiotlb_init(void)