diff options
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r-- | arch/blackfin/kernel/setup.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index a03c2dfff4a3..1a942a721d51 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -238,7 +238,12 @@ void __init setup_arch(char **cmdline_p) | |||
238 | memory_end = _ramend - DMA_UNCACHED_REGION; | 238 | memory_end = _ramend - DMA_UNCACHED_REGION; |
239 | 239 | ||
240 | _ramstart = (unsigned long)__bss_stop; | 240 | _ramstart = (unsigned long)__bss_stop; |
241 | #ifdef CONFIG_MPU | ||
242 | /* Round up to multiple of 4MB. */ | ||
243 | memory_start = (_ramstart + 0x3fffff) & ~0x3fffff; | ||
244 | #else | ||
241 | memory_start = PAGE_ALIGN(_ramstart); | 245 | memory_start = PAGE_ALIGN(_ramstart); |
246 | #endif | ||
242 | 247 | ||
243 | #if defined(CONFIG_MTD_UCLINUX) | 248 | #if defined(CONFIG_MTD_UCLINUX) |
244 | /* generic memory mapped MTD driver */ | 249 | /* generic memory mapped MTD driver */ |
@@ -307,6 +312,11 @@ void __init setup_arch(char **cmdline_p) | |||
307 | printk(KERN_NOTICE "Warning: limiting memory to %liMB due to hardware anomaly 05000263\n", memory_end >> 20); | 312 | printk(KERN_NOTICE "Warning: limiting memory to %liMB due to hardware anomaly 05000263\n", memory_end >> 20); |
308 | #endif /* ANOMALY_05000263 */ | 313 | #endif /* ANOMALY_05000263 */ |
309 | 314 | ||
315 | #ifdef CONFIG_MPU | ||
316 | page_mask_nelts = ((_ramend >> PAGE_SHIFT) + 31) / 32; | ||
317 | page_mask_order = get_order(3 * page_mask_nelts * sizeof(long)); | ||
318 | #endif | ||
319 | |||
310 | #if !defined(CONFIG_MTD_UCLINUX) | 320 | #if !defined(CONFIG_MTD_UCLINUX) |
311 | memory_end -= SIZE_4K; /*In case there is no valid CPLB behind memory_end make sure we don't get to close*/ | 321 | memory_end -= SIZE_4K; /*In case there is no valid CPLB behind memory_end make sure we don't get to close*/ |
312 | #endif | 322 | #endif |