aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorJonathan Austin <jonathan.austin@arm.com>2013-02-28 12:51:05 -0500
committerJonathan Austin <jonathan.austin@arm.com>2013-06-07 12:02:53 -0400
commit9a271567fe9980a7e7ded0c6250d56200c3678ee (patch)
tree98a7687dcfabcd9d51858d227e23374926054b10 /arch/arm/mm
parent5ad7dcbe40ae52bee67d7ed61efb6a3fccb6dc2b (diff)
ARM: mpu: Complete initialisation of the MPU after reaching the C-world
Much like with the MMU, MPU initialisation is performed in two stages; the first in the pre-C world and the 'real' initialisation during arch setup. This patch wires in previously added MPU initialisation functions so that the whole of memory is mapped with the appropriate region properties for 'normal' RAM (the appropriate properties depend on whether the system is SMP). Stub initialisation functions are added for the case that there MPU support is not configured in to the kernel. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com> CC: Hyok S. Choi <hyok.choi@samsung.com>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/nommu.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 0897d6bd9c2d..c1b494d43ed1 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -265,6 +265,9 @@ void __init mpu_setup(void)
265 mpu_max_regions()); 265 mpu_max_regions());
266 } 266 }
267} 267}
268#else
269static void sanity_check_meminfo_mpu(void) {}
270static void __init mpu_setup(void) {}
268#endif /* CONFIG_ARM_MPU */ 271#endif /* CONFIG_ARM_MPU */
269 272
270void __init arm_mm_memblock_reserve(void) 273void __init arm_mm_memblock_reserve(void)
@@ -286,7 +289,9 @@ void __init arm_mm_memblock_reserve(void)
286 289
287void __init sanity_check_meminfo(void) 290void __init sanity_check_meminfo(void)
288{ 291{
289 phys_addr_t end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]); 292 phys_addr_t end;
293 sanity_check_meminfo_mpu();
294 end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]);
290 high_memory = __va(end - 1) + 1; 295 high_memory = __va(end - 1) + 1;
291} 296}
292 297
@@ -297,6 +302,7 @@ void __init sanity_check_meminfo(void)
297void __init paging_init(struct machine_desc *mdesc) 302void __init paging_init(struct machine_desc *mdesc)
298{ 303{
299 early_trap_init((void *)CONFIG_VECTORS_BASE); 304 early_trap_init((void *)CONFIG_VECTORS_BASE);
305 mpu_setup();
300 bootmem_init(); 306 bootmem_init();
301} 307}
302 308