]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/pci-swiotlb_64.c
x86: fix asm warning in head_32.S
[linux-2.6] / arch / x86 / kernel / pci-swiotlb_64.c
index b2f405ea7c85002b779b3c928a26ce424c9a0a0e..490da7f4b8d0dd8e29abf7ddd2e11b01fe19f196 100644 (file)
@@ -5,18 +5,24 @@
 #include <linux/module.h>
 #include <linux/dma-mapping.h>
 
-#include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/swiotlb.h>
 #include <asm/dma.h>
 
 int swiotlb __read_mostly;
-EXPORT_SYMBOL(swiotlb);
+
+static dma_addr_t
+swiotlb_map_single_phys(struct device *hwdev, phys_addr_t paddr, size_t size,
+                       int direction)
+{
+       return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction);
+}
 
 const struct dma_mapping_ops swiotlb_dma_ops = {
        .mapping_error = swiotlb_dma_mapping_error,
        .alloc_coherent = swiotlb_alloc_coherent,
        .free_coherent = swiotlb_free_coherent,
-       .map_single = swiotlb_map_single,
+       .map_single = swiotlb_map_single_phys,
        .unmap_single = swiotlb_unmap_single,
        .sync_single_for_cpu = swiotlb_sync_single_for_cpu,
        .sync_single_for_device = swiotlb_sync_single_for_device,