···11-/*22- * include/asm-sh/cpu-sh2/shmparam.h33- *44- * Copyright (C) 2003 Paul Mundt55- *66- * This file is subject to the terms and conditions of the GNU General Public77- * License. See the file "COPYING" in the main directory of this archive88- * for more details.99- */1010-#ifndef __ASM_CPU_SH2_SHMPARAM_H1111-#define __ASM_CPU_SH2_SHMPARAM_H1212-1313-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */1414-1515-#endif /* __ASM_CPU_SH2_SHMPARAM_H */1616-
+23-29
include/asm-sh/cpu-sh3/cacheflush.h
···3535 /* 32KB cache, 4kb PAGE sizes need to check bit 12 */3636#define CACHE_ALIAS 0x0000100037373838-extern void flush_cache_all(void);3939-extern void flush_cache_mm(struct mm_struct *mm);4040-extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start,3838+#define PG_mapped PG_arch_13939+4040+void flush_cache_all(void);4141+void flush_cache_mm(struct mm_struct *mm);4242+void flush_cache_range(struct vm_area_struct *vma, unsigned long start,4143 unsigned long end);4242-extern void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn);4343-extern void flush_dcache_page(struct page *pg);4444-extern void flush_icache_range(unsigned long start, unsigned long end);4545-extern void flush_icache_page(struct vm_area_struct *vma, struct page *page);4444+void flush_cache_page(struct vm_area_struct *vma, unsigned long addr, unsigned long pfn);4545+void flush_dcache_page(struct page *pg);4646+void flush_icache_range(unsigned long start, unsigned long end);4747+void flush_icache_page(struct vm_area_struct *vma, struct page *page);4848+#else4949+#define flush_cache_all() do { } while (0)5050+#define flush_cache_mm(mm) do { } while (0)5151+#define flush_cache_range(vma, start, end) do { } while (0)5252+#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)5353+#define flush_dcache_page(page) do { } while (0)5454+#define flush_icache_range(start, end) do { } while (0)5555+#define flush_icache_page(vma,pg) do { } while (0)5656+#endif46574758#define flush_dcache_mmap_lock(mapping) do { } while (0)4859#define flush_dcache_mmap_unlock(mapping) do { } while (0)49605061/* SH3 has unified cache so no special action needed here */5162#define flush_cache_sigtramp(vaddr) do { } while (0)5252-#define flush_page_to_ram(page) do { } while (0)5363#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)54645565#define p3_cache_init() do { } while (0)56665757-#define PG_mapped PG_arch_15858-5959-/* We provide our own get_unmapped_area to avoid cache alias issue */6767+/*6868+ * We provide our own get_unmapped_area to avoid cache aliasing issues6969+ * on SH7705 with a 32KB cache, and to page align addresses in the7070+ * non-aliasing case.7171+ */6072#define HAVE_ARCH_UNMAPPED_AREA6161-6262-#else6363-6464-#define flush_cache_all() do { } while (0)6565-#define flush_cache_mm(mm) do { } while (0)6666-#define flush_cache_range(vma, start, end) do { } while (0)6767-#define flush_cache_page(vma, vmaddr, pfn) do { } while (0)6868-#define flush_dcache_page(page) do { } while (0)6969-#define flush_dcache_mmap_lock(mapping) do { } while (0)7070-#define flush_dcache_mmap_unlock(mapping) do { } while (0)7171-#define flush_icache_range(start, end) do { } while (0)7272-#define flush_icache_page(vma,pg) do { } while (0)7373-#define flush_icache_user_range(vma,pg,adr,len) do { } while (0)7474-#define flush_cache_sigtramp(vaddr) do { } while (0)7575-7676-#define p3_cache_init() do { } while (0)7777-7878-#endif79738074#endif /* __ASM_CPU_SH3_CACHEFLUSH_H */8175
-16
include/asm-sh/cpu-sh3/shmparam.h
···11-/*22- * include/asm-sh/cpu-sh3/shmparam.h33- *44- * Copyright (C) 1999 Niibe Yutaka55- *66- * This file is subject to the terms and conditions of the GNU General Public77- * License. See the file "COPYING" in the main directory of this archive88- * for more details.99- */1010-#ifndef __ASM_CPU_SH3_SHMPARAM_H1111-#define __ASM_CPU_SH3_SHMPARAM_H1212-1313-#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */1414-1515-#endif /* __ASM_CPU_SH3_SHMPARAM_H */1616-
-19
include/asm-sh/cpu-sh4/shmparam.h
···11-/*22- * include/asm-sh/cpu-sh4/shmparam.h33- *44- * Copyright (C) 1999 Niibe Yutaka55- *66- * This file is subject to the terms and conditions of the GNU General Public77- * License. See the file "COPYING" in the main directory of this archive88- * for more details.99- */1010-#ifndef __ASM_CPU_SH4_SHMPARAM_H1111-#define __ASM_CPU_SH4_SHMPARAM_H1212-1313-/*1414- * SH-4 has D-cache alias issue1515- */1616-#define SHMLBA (PAGE_SIZE*4) /* attach addr a multiple of this */1717-1818-#endif /* __ASM_CPU_SH4_SHMPARAM_H */1919-
+17-3
include/asm-sh/shmparam.h
···11+/*22+ * include/asm-sh/shmparam.h33+ *44+ * Copyright (C) 1999 Niibe Yutaka55+ * Copyright (C) 2006 Paul Mundt66+ *77+ * This file is subject to the terms and conditions of the GNU General Public88+ * License. See the file "COPYING" in the main directory of this archive99+ * for more details.1010+ */111#ifndef __ASM_SH_SHMPARAM_H212#define __ASM_SH_SHMPARAM_H33-#ifdef __KERNEL__41355-#include <asm/cpu/shmparam.h>1414+/*1515+ * SH-4 and SH-3 7705 have an aliasing dcache. Bump this up to a sensible value1616+ * for everyone, and work out the specifics from the probed cache descriptor.1717+ */1818+#define SHMLBA 0x4000 /* attach addr a multiple of this */61977-#endif /* __KERNEL__ */2020+#define __ARCH_FORCE_SHMLBA2121+822#endif /* __ASM_SH_SHMPARAM_H */