Skip to content

Commit

Permalink
sh: consolidate flush_dcache_mmap_lock/unlock() definitions.
Browse files Browse the repository at this point in the history
All of the flush_dcache_mmap_lock()/flush_dcache_mmap_unlock()
definitions are identical across all CPUs, so just provide them
generically in asm/cacheflush.h.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Aug 15, 2009
1 parent 0b445dc commit 7fbb2d3
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 17 deletions.
5 changes: 3 additions & 2 deletions arch/sh/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
#define flush_dcache_page(page) do { } while (0)
#define flush_icache_range(start, end) do { } while (0)
#define flush_icache_page(vma,pg) do { } while (0)
#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
#define flush_cache_sigtramp(vaddr) do { } while (0)
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
#define __flush_wback_region(start, size) do { (void)(start); } while (0)
Expand Down Expand Up @@ -71,6 +69,9 @@ extern void copy_from_user_page(struct vm_area_struct *vma,
#define flush_cache_vmap(start, end) flush_cache_all()
#define flush_cache_vunmap(start, end) flush_cache_all()

#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)

void kmap_coherent_init(void);
void *kmap_coherent(struct page *page, unsigned long addr);
void kunmap_coherent(void);
Expand Down
2 changes: 0 additions & 2 deletions arch/sh/include/cpu-common/cpu/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#define flush_cache_range(vma, start, end) do { } while (0)
#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
#define flush_dcache_page(page) do { } while (0)
#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
#define flush_icache_range(start, end) do { } while (0)
#define flush_icache_page(vma,pg) do { } while (0)
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
Expand Down
2 changes: 0 additions & 2 deletions arch/sh/include/cpu-sh2a/cpu/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#define flush_cache_range(vma, start, end) do { } while (0)
#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)
#define flush_dcache_page(page) do { } while (0)
#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)
void flush_icache_range(unsigned long start, unsigned long end);
#define flush_icache_page(vma,pg) do { } while (0)
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
Expand Down
3 changes: 0 additions & 3 deletions arch/sh/include/cpu-sh3/cpu/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ void flush_dcache_page(struct page *pg);
void flush_icache_range(unsigned long start, unsigned long end);
void flush_icache_page(struct vm_area_struct *vma, struct page *page);

#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)

/* SH3 has unified cache so no special action needed here */
#define flush_cache_sigtramp(vaddr) do { } while (0)
#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)
Expand Down
4 changes: 0 additions & 4 deletions arch/sh/include/cpu-sh4/cpu/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ void flush_cache_range(struct vm_area_struct *vma, unsigned long start,
void flush_cache_page(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn);
void flush_dcache_page(struct page *pg);

#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)

void flush_icache_range(unsigned long start, unsigned long end);
void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
unsigned long addr, int len);
Expand Down
4 changes: 0 additions & 4 deletions arch/sh/include/cpu-sh5/cpu/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ extern void flush_icache_user_range(struct vm_area_struct *vma,
int len);

#define flush_cache_dup_mm(mm) flush_cache_mm(mm)

#define flush_dcache_mmap_lock(mapping) do { } while (0)
#define flush_dcache_mmap_unlock(mapping) do { } while (0)

#define flush_icache_page(vma, page) do { } while (0)

#endif /* __ASSEMBLY__ */
Expand Down

0 comments on commit 7fbb2d3

Please sign in to comment.