|
@@ -13,12 +13,18 @@
|
|
int swiotlb __read_mostly;
|
|
int swiotlb __read_mostly;
|
|
EXPORT_SYMBOL(swiotlb);
|
|
EXPORT_SYMBOL(swiotlb);
|
|
|
|
|
|
|
|
+/* Set this to 1 if there is a HW IOMMU in the system */
|
|
|
|
+int iommu_detected __read_mostly;
|
|
|
|
+
|
|
struct dma_mapping_ops swiotlb_dma_ops = {
|
|
struct dma_mapping_ops swiotlb_dma_ops = {
|
|
- .mapping_error = swiotlb_dma_mapping_error,
|
|
|
|
.alloc_coherent = swiotlb_alloc_coherent,
|
|
.alloc_coherent = swiotlb_alloc_coherent,
|
|
.free_coherent = swiotlb_free_coherent,
|
|
.free_coherent = swiotlb_free_coherent,
|
|
.map_single = swiotlb_map_single,
|
|
.map_single = swiotlb_map_single,
|
|
.unmap_single = swiotlb_unmap_single,
|
|
.unmap_single = swiotlb_unmap_single,
|
|
|
|
+ .map_single_attrs = swiotlb_map_single_attrs,
|
|
|
|
+ .unmap_single_attrs = swiotlb_unmap_single_attrs,
|
|
|
|
+ .map_sg_attrs = swiotlb_map_sg_attrs,
|
|
|
|
+ .unmap_sg_attrs = swiotlb_unmap_sg_attrs,
|
|
.sync_single_for_cpu = swiotlb_sync_single_for_cpu,
|
|
.sync_single_for_cpu = swiotlb_sync_single_for_cpu,
|
|
.sync_single_for_device = swiotlb_sync_single_for_device,
|
|
.sync_single_for_device = swiotlb_sync_single_for_device,
|
|
.sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
|
|
.sync_single_range_for_cpu = swiotlb_sync_single_range_for_cpu,
|
|
@@ -28,6 +34,7 @@ struct dma_mapping_ops swiotlb_dma_ops = {
|
|
.map_sg = swiotlb_map_sg,
|
|
.map_sg = swiotlb_map_sg,
|
|
.unmap_sg = swiotlb_unmap_sg,
|
|
.unmap_sg = swiotlb_unmap_sg,
|
|
.dma_supported_op = swiotlb_dma_supported,
|
|
.dma_supported_op = swiotlb_dma_supported,
|
|
|
|
+ .mapping_error = swiotlb_dma_mapping_error,
|
|
};
|
|
};
|
|
|
|
|
|
void __init pci_swiotlb_init(void)
|
|
void __init pci_swiotlb_init(void)
|