aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/init.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2006-09-27 05:36:17 -0400
committerPaul Mundt <lethal@linux-sh.org>2006-09-27 05:36:17 -0400
commitf3c2575818fab45f8609e4aef2e43ab02b3a142e (patch)
treea4924d7dd8f8df229e36fab24ccccfe12437509b /arch/sh/kernel/cpu/init.c
parent87b0ef91b6f27c07bf7dcce8584437481f473092 (diff)
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 'arch/sh/kernel/cpu/init.c')
-rw-r--r--arch/sh/kernel/cpu/init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/init.c b/arch/sh/kernel/cpu/init.c
index 731dd61419dd..bfb90eb0b7a6 100644
--- a/arch/sh/kernel/cpu/init.c
+++ b/arch/sh/kernel/cpu/init.c
@@ -14,6 +14,7 @@
14#include <linux/kernel.h> 14#include <linux/kernel.h>
15#include <asm/processor.h> 15#include <asm/processor.h>
16#include <asm/uaccess.h> 16#include <asm/uaccess.h>
17#include <asm/page.h>
17#include <asm/system.h> 18#include <asm/system.h>
18#include <asm/cacheflush.h> 19#include <asm/cacheflush.h>
19#include <asm/cache.h> 20#include <asm/cache.h>
@@ -198,6 +199,10 @@ asmlinkage void __init sh_cpu_init(void)
198 /* Init the cache */ 199 /* Init the cache */
199 cache_init(); 200 cache_init();
200 201
202 shm_align_mask = max_t(unsigned long,
203 cpu_data->dcache.way_size - 1,
204 PAGE_SIZE - 1);
205
201 /* Disable the FPU */ 206 /* Disable the FPU */
202 if (fpu_disabled) { 207 if (fpu_disabled) {
203 printk("FPU Disabled\n"); 208 printk("FPU Disabled\n");