Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69492
b: refs/heads/master
c: 84aa462
h: refs/heads/master
v: v3
  • Loading branch information
Russell King authored and Russell King committed Oct 12, 2007
1 parent 69f9707 commit 3cf1dd4
Show file tree
Hide file tree
Showing 4 changed files with 12 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: 353ba84acdd551c737ac71577322393fceb969f0
refs/heads/master: 84aa462e2c2cd1b921f6b8e283f8d41666e02e8e
4 changes: 2 additions & 2 deletions trunk/arch/arm/common/dmabounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ map_single(struct device *dev, void *ptr, size_t size,
* We don't need to sync the DMA buffer since
* it was allocated via the coherent allocators.
*/
consistent_sync(ptr, size, dir);
dma_cache_maint(ptr, size, dir);
}

return dma_addr;
Expand Down Expand Up @@ -383,7 +383,7 @@ sync_single(struct device *dev, dma_addr_t dma_addr, size_t size,
* via the coherent allocators.
*/
} else {
consistent_sync(dma_to_virt(dev, dma_addr), size, dir);
dma_cache_maint(dma_to_virt(dev, dma_addr), size, dir);
}
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/arm/mm/consistent.c
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ core_initcall(consistent_init);
* platforms with CONFIG_DMABOUNCE.
* Use the driver DMA support - see dma-mapping.h (dma_sync_*)
*/
void consistent_sync(const void *start, size_t size, int direction)
void dma_cache_maint(const void *start, size_t size, int direction)
{
const void *end = start + size;

Expand All @@ -504,4 +504,4 @@ void consistent_sync(const void *start, size_t size, int direction)
BUG();
}
}
EXPORT_SYMBOL(consistent_sync);
EXPORT_SYMBOL(dma_cache_maint);
14 changes: 7 additions & 7 deletions trunk/include/asm-arm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* platforms with CONFIG_DMABOUNCE.
* Use the driver DMA support - see dma-mapping.h (dma_sync_*)
*/
extern void consistent_sync(const void *kaddr, size_t size, int rw);
extern void dma_cache_maint(const void *kaddr, size_t size, int rw);

/*
* Return whether the given device DMA address mask can be supported
Expand Down Expand Up @@ -165,7 +165,7 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size,
enum dma_data_direction dir)
{
if (!arch_is_coherent())
consistent_sync(cpu_addr, size, dir);
dma_cache_maint(cpu_addr, size, dir);

return virt_to_dma(dev, (unsigned long)cpu_addr);
}
Expand Down Expand Up @@ -278,7 +278,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
virt = page_address(sg->page) + sg->offset;

if (!arch_is_coherent())
consistent_sync(virt, sg->length, dir);
dma_cache_maint(virt, sg->length, dir);
}

return nents;
Expand Down Expand Up @@ -334,15 +334,15 @@ dma_sync_single_for_cpu(struct device *dev, dma_addr_t handle, size_t size,
enum dma_data_direction dir)
{
if (!arch_is_coherent())
consistent_sync((void *)dma_to_virt(dev, handle), size, dir);
dma_cache_maint((void *)dma_to_virt(dev, handle), size, dir);
}

static inline void
dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size,
enum dma_data_direction dir)
{
if (!arch_is_coherent())
consistent_sync((void *)dma_to_virt(dev, handle), size, dir);
dma_cache_maint((void *)dma_to_virt(dev, handle), size, dir);
}
#else
extern void dma_sync_single_for_cpu(struct device*, dma_addr_t, size_t, enum dma_data_direction);
Expand Down Expand Up @@ -373,7 +373,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
for (i = 0; i < nents; i++, sg++) {
char *virt = page_address(sg->page) + sg->offset;
if (!arch_is_coherent())
consistent_sync(virt, sg->length, dir);
dma_cache_maint(virt, sg->length, dir);
}
}

Expand All @@ -386,7 +386,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
for (i = 0; i < nents; i++, sg++) {
char *virt = page_address(sg->page) + sg->offset;
if (!arch_is_coherent())
consistent_sync(virt, sg->length, dir);
dma_cache_maint(virt, sg->length, dir);
}
}
#else
Expand Down

0 comments on commit 3cf1dd4

Please sign in to comment.