summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/nommu.c
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2018-04-03 11:36:37 +0200
committerRussell King <rmk+kernel@armlinux.org.uk>2018-05-19 12:53:46 +0200
commit9cfb541a4ad45168925078f7d1fe3a7363ba27e2 (patch)
tree3bf2777b24262ea6107400ba184bf182c6ed7508 /arch/arm/mm/nommu.c
parentARM: 8752/1: Kconfig: default ARM_MODULE_PLTS to 'y' (diff)
downloadlinux-9cfb541a4ad45168925078f7d1fe3a7363ba27e2.tar.xz
linux-9cfb541a4ad45168925078f7d1fe3a7363ba27e2.zip
ARM: 8754/1: NOMMU: Move PMSAv7 MPU under it's own namespace
We are going to support different MPU which programming model is not compatible to PMSAv7, so move PMSAv7 MPU under it's own namespace. Tested-by: Szemz? AndrĂ¡s <sza@esh.hu> Tested-by: Alexandre TORGUE <alexandre.torgue@st.com> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/mm/nommu.c')
-rw-r--r--arch/arm/mm/nommu.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 7c087961b7ce..edbaa47be160 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -99,6 +99,32 @@ void __init arm_mm_memblock_reserve(void)
memblock_reserve(0, 1);
}
+static void __init adjust_lowmem_bounds_mpu(void)
+{
+ unsigned long pmsa = read_cpuid_ext(CPUID_EXT_MMFR0) & MMFR0_PMSA;
+
+ switch (pmsa) {
+ case MMFR0_PMSAv7:
+ pmsav7_adjust_lowmem_bounds();
+ break;
+ default:
+ break;
+ }
+}
+
+static void __init mpu_setup(void)
+{
+ unsigned long pmsa = read_cpuid_ext(CPUID_EXT_MMFR0) & MMFR0_PMSA;
+
+ switch (pmsa) {
+ case MMFR0_PMSAv7:
+ pmsav7_setup();
+ break;
+ default:
+ break;
+ }
+}
+
void __init adjust_lowmem_bounds(void)
{
phys_addr_t end;