aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-02-26 20:05:10 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-26 20:05:10 -0500
commitf24407d2bde27a4eb75ce5e52069bf4f1ba0e8a5 (patch)
tree6ad6dbc0b3d394435615b5e53b7d2ab3bde4c354 /arch
parent654451748b779b28077d9058442d0f354251870d (diff)
parent73c77e2ccc14413c232c3e0b3aa43a0c4b72ec70 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/xfs-vipt
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/xfs-vipt: xfs: fix xfs to work with Virtually Indexed architectures sh: add mm API for DMA to vmalloc/vmap areas arm: add mm API for DMA to vmalloc/vmap areas parisc: add mm API for DMA to vmalloc/vmap areas mm: add coherence API for DMA to vmalloc/vmap areas
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/include/asm/cacheflush.h10
-rw-r--r--arch/parisc/include/asm/cacheflush.h12
-rw-r--r--arch/sh/include/asm/cacheflush.h8
3 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/include/asm/cacheflush.h b/arch/arm/include/asm/cacheflush.h
index 8113bb5fb66e..5fe4a2ad7fa3 100644
--- a/arch/arm/include/asm/cacheflush.h
+++ b/arch/arm/include/asm/cacheflush.h
@@ -447,6 +447,16 @@ static inline void __flush_icache_all(void)
447 : "r" (0)); 447 : "r" (0));
448#endif 448#endif
449} 449}
450static inline void flush_kernel_vmap_range(void *addr, int size)
451{
452 if ((cache_is_vivt() || cache_is_vipt_aliasing()))
453 __cpuc_flush_dcache_area(addr, (size_t)size);
454}
455static inline void invalidate_kernel_vmap_range(void *addr, int size)
456{
457 if ((cache_is_vivt() || cache_is_vipt_aliasing()))
458 __cpuc_flush_dcache_area(addr, (size_t)size);
459}
450 460
451#define ARCH_HAS_FLUSH_ANON_PAGE 461#define ARCH_HAS_FLUSH_ANON_PAGE
452static inline void flush_anon_page(struct vm_area_struct *vma, 462static inline void flush_anon_page(struct vm_area_struct *vma,
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
index 7a73b615c23d..477277739da5 100644
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -38,6 +38,18 @@ void flush_cache_mm(struct mm_struct *mm);
38 38
39#define flush_kernel_dcache_range(start,size) \ 39#define flush_kernel_dcache_range(start,size) \
40 flush_kernel_dcache_range_asm((start), (start)+(size)); 40 flush_kernel_dcache_range_asm((start), (start)+(size));
41/* vmap range flushes and invalidates. Architecturally, we don't need
42 * the invalidate, because the CPU should refuse to speculate once an
43 * area has been flushed, so invalidate is left empty */
44static inline void flush_kernel_vmap_range(void *vaddr, int size)
45{
46 unsigned long start = (unsigned long)vaddr;
47
48 flush_kernel_dcache_range_asm(start, start + size);
49}
50static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
51{
52}
41 53
42#define flush_cache_vmap(start, end) flush_cache_all() 54#define flush_cache_vmap(start, end) flush_cache_all()
43#define flush_cache_vunmap(start, end) flush_cache_all() 55#define flush_cache_vunmap(start, end) flush_cache_all()
diff --git a/arch/sh/include/asm/cacheflush.h b/arch/sh/include/asm/cacheflush.h
index dda96eb3e7c0..da3ebec921a7 100644
--- a/arch/sh/include/asm/cacheflush.h
+++ b/arch/sh/include/asm/cacheflush.h
@@ -63,6 +63,14 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
63 if (boot_cpu_data.dcache.n_aliases && PageAnon(page)) 63 if (boot_cpu_data.dcache.n_aliases && PageAnon(page))
64 __flush_anon_page(page, vmaddr); 64 __flush_anon_page(page, vmaddr);
65} 65}
66static inline void flush_kernel_vmap_range(void *addr, int size)
67{
68 __flush_wback_region(addr, size);
69}
70static inline void invalidate_kernel_vmap_range(void *addr, int size)
71{
72 __flush_invalidate_region(addr, size);
73}
66 74
67#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE 75#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
68static inline void flush_kernel_dcache_page(struct page *page) 76static inline void flush_kernel_dcache_page(struct page *page)