git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git]
/
arch
/
sh
/
mm
/
consistent.c
diff --git
a/arch/sh/mm/consistent.c
b/arch/sh/mm/consistent.c
index
ee73e30
..
e220c29
100644
(file)
--- a/
arch/sh/mm/consistent.c
+++ b/
arch/sh/mm/consistent.c
@@
-9,6
+9,8
@@
*/
#include <linux/mm.h>
#include <linux/dma-mapping.h>
*/
#include <linux/mm.h>
#include <linux/dma-mapping.h>
+#include <asm/cacheflush.h>
+#include <asm/addrspace.h>
#include <asm/io.h>
void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *handle)
#include <asm/io.h>
void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *handle)
@@
-26,12
+28,13
@@
void *consistent_alloc(gfp_t gfp, size_t size, dma_addr_t *handle)
split_page(page, order);
ret = page_address(page);
split_page(page, order);
ret = page_address(page);
+ memset(ret, 0, size);
*handle = virt_to_phys(ret);
/*
* We must flush the cache before we pass it on to the device
*/
*handle = virt_to_phys(ret);
/*
* We must flush the cache before we pass it on to the device
*/
-
dma_cache_wback_inv
(ret, size);
+
__flush_purge_region
(ret, size);
page = virt_to_page(ret);
free = page + (size >> PAGE_SHIFT);
page = virt_to_page(ret);
free = page + (size >> PAGE_SHIFT);
@@
-65,13
+68,13
@@
void consistent_sync(void *vaddr, size_t size, int direction)
switch (direction) {
case DMA_FROM_DEVICE: /* invalidate only */
switch (direction) {
case DMA_FROM_DEVICE: /* invalidate only */
-
dma_cache_inv
(p1addr, size);
+
__flush_invalidate_region
(p1addr, size);
break;
case DMA_TO_DEVICE: /* writeback only */
break;
case DMA_TO_DEVICE: /* writeback only */
-
dma_cache_wback
(p1addr, size);
+
__flush_wback_region
(p1addr, size);
break;
case DMA_BIDIRECTIONAL: /* writeback and invalidate */
break;
case DMA_BIDIRECTIONAL: /* writeback and invalidate */
-
dma_cache_wback_inv
(p1addr, size);
+
__flush_purge_region
(p1addr, size);
break;
default:
BUG();
break;
default:
BUG();