aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2014-09-22 01:54:42 -0400
committerMax Filippov <jcmvbkbc@gmail.com>2014-10-21 05:28:50 -0400
commitb6cee17b7d5999ae5f9ea51643dc6ea6c3e4efd4 (patch)
tree84b097752753fb8edbd03c3147e80c1bb7ccf588 /arch
parentd10fa7cf3dc0b38995a691c3f4e9f90acaaa05f2 (diff)
xtensa: nommu: don't build most of the cache flushing code
Most cache flushing code is only relevant for MMU. Don't build it for nommu configuration. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/xtensa/include/asm/cacheflush.h5
-rw-r--r--arch/xtensa/include/asm/page.h2
-rw-r--r--arch/xtensa/mm/Makefile4
3 files changed, 6 insertions, 5 deletions
diff --git a/arch/xtensa/include/asm/cacheflush.h b/arch/xtensa/include/asm/cacheflush.h
index 01438e97edc6..5f67ace97b32 100644
--- a/arch/xtensa/include/asm/cacheflush.h
+++ b/arch/xtensa/include/asm/cacheflush.h
@@ -86,7 +86,8 @@ static inline void __invalidate_icache_page_alias(unsigned long virt,
86 * (see also Documentation/cachetlb.txt) 86 * (see also Documentation/cachetlb.txt)
87 */ 87 */
88 88
89#if (DCACHE_WAY_SIZE > PAGE_SIZE) || defined(CONFIG_SMP) 89#if defined(CONFIG_MMU) && \
90 ((DCACHE_WAY_SIZE > PAGE_SIZE) || defined(CONFIG_SMP))
90 91
91#ifdef CONFIG_SMP 92#ifdef CONFIG_SMP
92void flush_cache_all(void); 93void flush_cache_all(void);
@@ -152,7 +153,7 @@ void local_flush_cache_page(struct vm_area_struct *vma,
152#define flush_dcache_mmap_lock(mapping) do { } while (0) 153#define flush_dcache_mmap_lock(mapping) do { } while (0)
153#define flush_dcache_mmap_unlock(mapping) do { } while (0) 154#define flush_dcache_mmap_unlock(mapping) do { } while (0)
154 155
155#if (DCACHE_WAY_SIZE > PAGE_SIZE) 156#if defined(CONFIG_MMU) && (DCACHE_WAY_SIZE > PAGE_SIZE)
156 157
157extern void copy_to_user_page(struct vm_area_struct*, struct page*, 158extern void copy_to_user_page(struct vm_area_struct*, struct page*,
158 unsigned long, void*, const void*, unsigned long); 159 unsigned long, void*, const void*, unsigned long);
diff --git a/arch/xtensa/include/asm/page.h b/arch/xtensa/include/asm/page.h
index abe24c6f8b2f..619a51bb0163 100644
--- a/arch/xtensa/include/asm/page.h
+++ b/arch/xtensa/include/asm/page.h
@@ -145,7 +145,7 @@ extern void copy_page(void *to, void *from);
145 * some extra work 145 * some extra work
146 */ 146 */
147 147
148#if DCACHE_WAY_SIZE > PAGE_SIZE 148#if defined(CONFIG_MMU) && DCACHE_WAY_SIZE > PAGE_SIZE
149extern void clear_page_alias(void *vaddr, unsigned long paddr); 149extern void clear_page_alias(void *vaddr, unsigned long paddr);
150extern void copy_page_alias(void *to, void *from, 150extern void copy_page_alias(void *to, void *from,
151 unsigned long to_paddr, unsigned long from_paddr); 151 unsigned long to_paddr, unsigned long from_paddr);
diff --git a/arch/xtensa/mm/Makefile b/arch/xtensa/mm/Makefile
index f54f78e24d7b..e601e2fbe8e6 100644
--- a/arch/xtensa/mm/Makefile
+++ b/arch/xtensa/mm/Makefile
@@ -2,6 +2,6 @@
2# Makefile for the Linux/Xtensa-specific parts of the memory manager. 2# Makefile for the Linux/Xtensa-specific parts of the memory manager.
3# 3#
4 4
5obj-y := init.o cache.o misc.o 5obj-y := init.o misc.o
6obj-$(CONFIG_MMU) += fault.o mmu.o tlb.o 6obj-$(CONFIG_MMU) += cache.o fault.o mmu.o tlb.o
7obj-$(CONFIG_HIGHMEM) += highmem.o 7obj-$(CONFIG_HIGHMEM) += highmem.o