Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158055
b: refs/heads/master
c: a8ad568
h: refs/heads/master
i:
  158053: f977310
  158051: 20b93ff
  158047: 5291ca3
v: v3
  • Loading branch information
Arnd Bergmann authored and Ingo Molnar committed Aug 10, 2009
1 parent 762a876 commit 74f74b6
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b683d42693c4e92b838117f5c6f7b90bfa1525c9
refs/heads/master: a8ad568dd8ca122aa8048ea067d3599820d1c1b4
27 changes: 22 additions & 5 deletions trunk/arch/x86/kernel/pci-nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/asm-generic/dma-mapping-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr,
if (ops->sync_single_for_cpu)
ops->sync_single_for_cpu(dev, addr, size, dir);
debug_dma_sync_single_for_cpu(dev, addr, size, dir);
flush_write_buffers();
}

static inline void dma_sync_single_for_device(struct device *dev,
Expand All @@ -116,7 +115,6 @@ static inline void dma_sync_single_for_device(struct device *dev,
if (ops->sync_single_for_device)
ops->sync_single_for_device(dev, addr, size, dir);
debug_dma_sync_single_for_device(dev, addr, size, dir);
flush_write_buffers();
}

static inline void dma_sync_single_range_for_cpu(struct device *dev,
Expand All @@ -132,7 +130,6 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
ops->sync_single_range_for_cpu(dev, addr, offset, size, dir);
debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);

flush_write_buffers();
} else
dma_sync_single_for_cpu(dev, addr, size, dir);
}
Expand All @@ -150,7 +147,6 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
ops->sync_single_range_for_device(dev, addr, offset, size, dir);
debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir);

flush_write_buffers();
} else
dma_sync_single_for_device(dev, addr, size, dir);
}
Expand All @@ -165,7 +161,6 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
if (ops->sync_sg_for_cpu)
ops->sync_sg_for_cpu(dev, sg, nelems, dir);
debug_dma_sync_sg_for_cpu(dev, sg, nelems, dir);
flush_write_buffers();
}

static inline void
Expand All @@ -179,7 +174,6 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
ops->sync_sg_for_device(dev, sg, nelems, dir);
debug_dma_sync_sg_for_device(dev, sg, nelems, dir);

flush_write_buffers();
}

#define dma_map_single(d, a, s, r) dma_map_single_attrs(d, a, s, r, NULL)
Expand Down

0 comments on commit 74f74b6

Please sign in to comment.