aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/include
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-15 09:49:32 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-08-15 09:49:32 +0900
commitdde5e3ffb770ef2854bbc32c51a365e932919e19 (patch)
tree1b7936b8068f3532892b30a526d23b79bbe401f5 /arch/sh/include
parentcbbe2f68f678a90bebeb30b8a7fcd8aed0614879 (diff)
sh: rework nommu for generic cache.c use.
This does a bit of reorganizing for allowing nommu to use the new and generic cache.c, no functional changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include')
-rw-r--r--arch/sh/include/asm/cacheflush.h2
-rw-r--r--arch/sh/include/asm/page.h7
-rw-r--r--arch/sh/include/cpu-sh3/cpu/cacheflush.h2
-rw-r--r--arch/sh/include/cpu-sh4/cpu/cacheflush.h2
4 files changed, 3 insertions, 10 deletions
diff --git a/arch/sh/include/asm/cacheflush.h b/arch/sh/include/asm/cacheflush.h
index 4bf621e4146..9ec13fb909d 100644
--- a/arch/sh/include/asm/cacheflush.h
+++ b/arch/sh/include/asm/cacheflush.h
@@ -76,5 +76,7 @@ void kmap_coherent_init(void);
void *kmap_coherent(struct page *page, unsigned long addr);
void kunmap_coherent(void);
+#define PG_dcache_dirty PG_arch_1
+
#endif /* __KERNEL__ */
#endif /* __ASM_SH_CACHEFLUSH_H */
diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h
index 847eeabb908..a316eeb50b3 100644
--- a/arch/sh/include/asm/page.h
+++ b/arch/sh/include/asm/page.h
@@ -68,18 +68,13 @@ extern void clear_user_page(void *to, unsigned long address, struct page *page);
extern void copy_user_page(void *to, void *from, unsigned long address,
struct page *page);
-#elif defined(CONFIG_MMU)
+#else
extern void copy_user_highpage(struct page *to, struct page *from,
unsigned long vaddr, struct vm_area_struct *vma);
#define __HAVE_ARCH_COPY_USER_HIGHPAGE
extern void clear_user_highpage(struct page *page, unsigned long vaddr);
#define clear_user_highpage clear_user_highpage
-#else
-
-#define clear_user_page(page, vaddr, pg) clear_page(page)
-#define copy_user_page(to, from, vaddr, pg) copy_page(to, from)
-
#endif
/*
diff --git a/arch/sh/include/cpu-sh3/cpu/cacheflush.h b/arch/sh/include/cpu-sh3/cpu/cacheflush.h
index 6485ad5649a..3b5f3df4e1c 100644
--- a/arch/sh/include/cpu-sh3/cpu/cacheflush.h
+++ b/arch/sh/include/cpu-sh3/cpu/cacheflush.h
@@ -15,8 +15,6 @@
* SH4. Unlike the SH4 this is a unified cache so we need to do some work
* in mmap when 'exec'ing a new binary
*/
-#define PG_dcache_dirty PG_arch_1
-
void flush_cache_all(void);
void flush_cache_mm(struct mm_struct *mm);
#define flush_cache_dup_mm(mm) flush_cache_mm(mm)
diff --git a/arch/sh/include/cpu-sh4/cpu/cacheflush.h b/arch/sh/include/cpu-sh4/cpu/cacheflush.h
index 3564f172219..76764f0fb88 100644
--- a/arch/sh/include/cpu-sh4/cpu/cacheflush.h
+++ b/arch/sh/include/cpu-sh4/cpu/cacheflush.h
@@ -38,6 +38,4 @@ void flush_icache_user_range(struct vm_area_struct *vma, struct page *page,
/* Initialization of P3 area for copy_user_page */
void p3_cache_init(void);
-#define PG_dcache_dirty PG_arch_1
-
#endif /* __ASM_CPU_SH4_CACHEFLUSH_H */