summaryrefslogtreecommitdiffstats
path: root/include/asm-sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 18:36:17 +0900
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 18:36:17 +0900
commitf3c2575818fab45f8609e4aef2e43ab02b3a142e (patch)
treea4924d7dd8f8df229e36fab24ccccfe12437509b /include/asm-sh
parent87b0ef91b6f27c07bf7dcce8584437481f473092 (diff)
downloadlinux-f3c2575818fab45f8609e4aef2e43ab02b3a142e.tar.bz2
sh: Calculate shm alignment at runtime.
Set the SHM alignment at runtime, based off of probed cache desc. Optimize get_unmapped_area() to only colour align shared mappings. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh')
-rw-r--r--include/asm-sh/cacheflush.h2
-rw-r--r--include/asm-sh/cpu-sh3/cacheflush.h8
-rw-r--r--include/asm-sh/cpu-sh4/cacheflush.h3
-rw-r--r--include/asm-sh/page.h2
-rw-r--r--include/asm-sh/pgtable.h2
5 files changed, 4 insertions, 13 deletions
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h
index 92930b4a40d4..07f62ec9ff0c 100644
--- a/include/asm-sh/cacheflush.h
+++ b/include/asm-sh/cacheflush.h
@@ -28,5 +28,7 @@ extern void __flush_invalidate_region(void *start, int size);
memcpy(dst, src, len); \
} while (0)
+#define HAVE_ARCH_UNMAPPED_AREA
+
#endif /* __KERNEL__ */
#endif /* __ASM_SH_CACHEFLUSH_H */
diff --git a/include/asm-sh/cpu-sh3/cacheflush.h b/include/asm-sh/cpu-sh3/cacheflush.h
index 97f5a64c2ab8..03fde97a7fd0 100644
--- a/include/asm-sh/cpu-sh3/cacheflush.h
+++ b/include/asm-sh/cpu-sh3/cacheflush.h
@@ -64,12 +64,4 @@ void flush_icache_page(struct vm_area_struct *vma, struct page *page);
#define p3_cache_init() do { } while (0)
-/*
- * We provide our own get_unmapped_area to avoid cache aliasing issues
- * on SH7705 with a 32KB cache, and to page align addresses in the
- * non-aliasing case.
- */
-#define HAVE_ARCH_UNMAPPED_AREA
-
#endif /* __ASM_CPU_SH3_CACHEFLUSH_H */
-
diff --git a/include/asm-sh/cpu-sh4/cacheflush.h b/include/asm-sh/cpu-sh4/cacheflush.h
index a95fc951aff6..515fd574267c 100644
--- a/include/asm-sh/cpu-sh4/cacheflush.h
+++ b/include/asm-sh/cpu-sh4/cacheflush.h
@@ -39,9 +39,6 @@ void p3_cache_init(void);
#define PG_mapped PG_arch_1
-/* We provide our own get_unmapped_area to avoid cache alias issue */
-#define HAVE_ARCH_UNMAPPED_AREA
-
#ifdef CONFIG_MMU
extern int remap_area_pages(unsigned long addr, unsigned long phys_addr,
unsigned long size, unsigned long flags);
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h
index 3d8dae31a6f6..ca8b26d90475 100644
--- a/include/asm-sh/page.h
+++ b/include/asm-sh/page.h
@@ -44,6 +44,8 @@
extern void (*clear_page)(void *to);
extern void (*copy_page)(void *to, void *from);
+extern unsigned long shm_align_mask;
+
#ifdef CONFIG_MMU
extern void clear_page_slow(void *to);
extern void copy_page_slow(void *to, void *from);
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index 41c559d8ba87..2c8682ad1012 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -340,6 +340,4 @@ extern pte_t ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, pte_t
#include <asm-generic/pgtable.h>
#endif /* !__ASSEMBLY__ */
-
#endif /* __ASM_SH_PAGE_H */
-