Skip to content

Commit

Permalink
ARM: mpu: Complete initialisation of the MPU after reaching the C-world
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Will Deacon <[email protected]>
CC: Hyok S. Choi <[email protected]>
  • Loading branch information
jaustin committed Jun 7, 2013
1 parent 5ad7dcb commit 9a27156
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion arch/arm/mm/nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,9 @@ void __init mpu_setup(void)
mpu_max_regions());
}
}
#else
static void sanity_check_meminfo_mpu(void) {}
static void __init mpu_setup(void) {}
#endif /* CONFIG_ARM_MPU */

void __init arm_mm_memblock_reserve(void)
Expand All @@ -286,7 +289,9 @@ void __init arm_mm_memblock_reserve(void)

void __init sanity_check_meminfo(void)
{
phys_addr_t end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]);
phys_addr_t end;
sanity_check_meminfo_mpu();
end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]);
high_memory = __va(end - 1) + 1;
}

Expand All @@ -297,6 +302,7 @@ void __init sanity_check_meminfo(void)
void __init paging_init(struct machine_desc *mdesc)
{
early_trap_init((void *)CONFIG_VECTORS_BASE);
mpu_setup();
bootmem_init();
}

Expand Down

0 comments on commit 9a27156

Please sign in to comment.