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>
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <asm/processor.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/cache.h>
|
||||
@ -198,6 +199,10 @@ asmlinkage void __init sh_cpu_init(void)
|
||||
/* Init the cache */
|
||||
cache_init();
|
||||
|
||||
shm_align_mask = max_t(unsigned long,
|
||||
cpu_data->dcache.way_size - 1,
|
||||
PAGE_SIZE - 1);
|
||||
|
||||
/* Disable the FPU */
|
||||
if (fpu_disabled) {
|
||||
printk("FPU Disabled\n");
|
||||
|
Reference in New Issue
Block a user