Skip to content

Commit cbbe2f6

Browse files
committed
sh: rename pg-mmu.c -> cache.c, enable generically.
This builds in the newly created cache.c (renamed from pg-mmu.c) for both MMU and NOMMU configurations. The kmap_coherent() stubs and alias information recorded by each CPU family takes care of doing the right thing while enabling the code to be commonly shared. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 2739742 commit cbbe2f6

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

‎arch/sh/include/asm/cacheflush.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ extern void __flush_purge_region(void *start, int size);
4545
extern void __flush_invalidate_region(void *start, int size);
4646
#endif
4747

48-
#ifdef CONFIG_MMU
4948
#define ARCH_HAS_FLUSH_ANON_PAGE
5049
extern void __flush_anon_page(struct page *page, unsigned long);
5150

@@ -55,7 +54,6 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
5554
if (boot_cpu_data.dcache.n_aliases && PageAnon(page))
5655
__flush_anon_page(page, vmaddr);
5756
}
58-
#endif
5957

6058
#define ARCH_HAS_FLUSH_KERNEL_DCACHE_PAGE
6159
static inline void flush_kernel_dcache_page(struct page *page)

‎arch/sh/mm/Makefile_32‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
# Makefile for the Linux SuperH-specific parts of the memory manager.
33
#
44

5-
obj-y := init.o extable_32.o consistent.o mmap.o
5+
obj-y := cache.o init.o extable_32.o consistent.o mmap.o
66

77
ifndef CONFIG_CACHE_OFF
8-
cache-$(CONFIG_CPU_SH2) := cache-sh2.o
9-
cache-$(CONFIG_CPU_SH2A) := cache-sh2a.o
10-
cache-$(CONFIG_CPU_SH3) := cache-sh3.o
11-
cache-$(CONFIG_CPU_SH4) := cache-sh4.o flush-sh4.o
12-
cache-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
8+
cacheops-$(CONFIG_CPU_SH2) := cache-sh2.o
9+
cacheops-$(CONFIG_CPU_SH2A) := cache-sh2a.o
10+
cacheops-$(CONFIG_CPU_SH3) := cache-sh3.o
11+
cacheops-$(CONFIG_CPU_SH4) := cache-sh4.o flush-sh4.o
12+
cacheops-$(CONFIG_SH7705_CACHE_32KB) += cache-sh7705.o
1313
endif
1414

15-
obj-y += $(cache-y)
15+
obj-y += $(cacheops-y)
1616

1717
mmu-y := tlb-nommu.o pg-nommu.o
18-
mmu-$(CONFIG_MMU) := fault_32.o kmap.o tlbflush_32.o ioremap_32.o pg-mmu.o
18+
mmu-$(CONFIG_MMU) := fault_32.o kmap.o tlbflush_32.o ioremap_32.o
1919

2020
obj-y += $(mmu-y)
2121
obj-$(CONFIG_DEBUG_FS) += asids-debugfs.o
File renamed without changes.

0 commit comments

Comments
 (0)