Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+6 -5
+3 -2
arch/xtensa/include/asm/cacheflush.h
··· 86 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 92 #ifdef CONFIG_SMP 92 93 void flush_cache_all(void); ··· 153 152 #define flush_dcache_mmap_lock(mapping) do { } while (0) 154 153 #define flush_dcache_mmap_unlock(mapping) do { } while (0) 155 154 156 - #if (DCACHE_WAY_SIZE > PAGE_SIZE) 155 + #if defined(CONFIG_MMU) && (DCACHE_WAY_SIZE > PAGE_SIZE) 157 156 158 157 extern void copy_to_user_page(struct vm_area_struct*, struct page*, 159 158 unsigned long, void*, const void*, unsigned long);
+1 -1
arch/xtensa/include/asm/page.h
··· 145 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 149 149 extern void clear_page_alias(void *vaddr, unsigned long paddr); 150 150 extern void copy_page_alias(void *to, void *from, 151 151 unsigned long to_paddr, unsigned long from_paddr);
+2 -2
arch/xtensa/mm/Makefile
··· 2 2 # Makefile for the Linux/Xtensa-specific parts of the memory manager. 3 3 # 4 4 5 - obj-y := init.o cache.o misc.o 6 - obj-$(CONFIG_MMU) += fault.o mmu.o tlb.o 5 + obj-y := init.o misc.o 6 + obj-$(CONFIG_MMU) += cache.o fault.o mmu.o tlb.o 7 7 obj-$(CONFIG_HIGHMEM) += highmem.o