dma-ops: Remove flush_write_buffers() in dma-mapping-common.h
[safe/jmp/linux-2.6] / arch / x86 / kernel / pci-nommu.c
index c0a4222..a3933d4 100644 (file)
@@ -79,12 +79,29 @@ static void nommu_free_coherent(struct device *dev, size_t size, void *vaddr,
        free_pages((unsigned long)vaddr, get_order(size));
 }
 
+static void nommu_sync_single_for_device(struct device *dev,
+                       dma_addr_t addr, size_t size,
+                       enum dma_data_direction dir)
+{
+       flush_write_buffers();
+}
+
+
+static void nommu_sync_sg_for_device(struct device *dev,
+                       struct scatterlist *sg, int nelems,
+                       enum dma_data_direction dir)
+{
+       flush_write_buffers();
+}
+
 struct dma_map_ops nommu_dma_ops = {
-       .alloc_coherent = dma_generic_alloc_coherent,
-       .free_coherent  = nommu_free_coherent,
-       .map_sg         = nommu_map_sg,
-       .map_page       = nommu_map_page,
-       .is_phys        = 1,
+       .alloc_coherent         = dma_generic_alloc_coherent,
+       .free_coherent          = nommu_free_coherent,
+       .map_sg                 = nommu_map_sg,
+       .map_page               = nommu_map_page,
+       .sync_single_for_device = nommu_sync_single_for_device,
+       .sync_sg_for_device     = nommu_sync_sg_for_device,
+       .is_phys                = 1,
 };
 
 void __init no_iommu_init(void)