summaryrefslogtreecommitdiffstats
path: root/arch/parisc/include/asm/cacheflush.h
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2011-02-10 18:20:53 +0100
committerJames Bottomley <James.Bottomley@suse.de>2011-02-10 18:20:53 +0100
commit2c250ad23d438fa56e1beded374e44dc565c6c47 (patch)
tree8f7e115c81c066134e48e998cb9b7380ff43f21c /arch/parisc/include/asm/cacheflush.h
parentMerge branch 'tmpalias-flush' into for-next (diff)
parent[PARISC] fix per-cpu flag problem in the cpu affinity checkers (diff)
downloadlinux-2c250ad23d438fa56e1beded374e44dc565c6c47.tar.xz
linux-2c250ad23d438fa56e1beded374e44dc565c6c47.zip
Merge branch 'fixes' into for-next
Diffstat (limited to 'arch/parisc/include/asm/cacheflush.h')
-rw-r--r--arch/parisc/include/asm/cacheflush.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/parisc/include/asm/cacheflush.h b/arch/parisc/include/asm/cacheflush.h
index dc9286a4dcc7..d18328b3f938 100644
--- a/arch/parisc/include/asm/cacheflush.h
+++ b/arch/parisc/include/asm/cacheflush.h
@@ -35,6 +35,13 @@ void flush_cache_all_local(void);
void flush_cache_all(void);
void flush_cache_mm(struct mm_struct *mm);
+#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
+void flush_kernel_dcache_page_addr(void *addr);
+static inline void flush_kernel_dcache_page(struct page *page)
+{
+ flush_kernel_dcache_page_addr(page_address(page));
+}
+
#define flush_kernel_dcache_range(start,size) \
flush_kernel_dcache_range_asm((start), (start)+(size));
/* vmap range flushes and invalidates. Architecturally, we don't need
@@ -48,6 +55,16 @@ static inline void flush_kernel_vmap_range(void *vaddr, int size)
}
static inline void invalidate_kernel_vmap_range(void *vaddr, int size)
{
+ unsigned long start = (unsigned long)vaddr;
+ void *cursor = vaddr;
+
+ for ( ; cursor < vaddr + size; cursor += PAGE_SIZE) {
+ struct page *page = vmalloc_to_page(cursor);
+
+ if (test_and_clear_bit(PG_dcache_dirty, &page->flags))
+ flush_kernel_dcache_page(page);
+ }
+ flush_kernel_dcache_range_asm(start, start + size);
}
#define flush_cache_vmap(start, end) flush_cache_all()
@@ -99,13 +116,6 @@ flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vma
flush_dcache_page_asm(page_to_phys(page), vmaddr);
}
-#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
-void flush_kernel_dcache_page_addr(void *addr);
-static inline void flush_kernel_dcache_page(struct page *page)
-{
- flush_kernel_dcache_page_addr(page_address(page));
-}
-
#ifdef CONFIG_DEBUG_RODATA
void mark_rodata_ro(void);
#endif