aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Austin <jonathan.austin@arm.com>2013-02-22 13:56:04 -0500
committerJonathan Austin <jonathan.austin@arm.com>2013-06-17 10:13:03 -0400
commit801bb21c600161c8626d7d9cb649be869ee4dbbe (patch)
treed4418d0f772af88dbfbaa8a4019acc92c9a79df0
parenteb08375ea66e63c5e11dea69b43c5633d531ce81 (diff)
ARM: mpu: Allow enabling of the MPU via kconfig
Allows the user to select MPU support when compiling for ARM processors that support the PMSAv7. This ensures that CONFIG_SMP depends on the MPU in the case that no MMU is present. CONFIG_SMP_ON_UP is not implemented for nommu, so introduce an MMU dependency there. Signed-off-by: Jonathan Austin <jonathan.austin@arm.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/Kconfig-nommu11
2 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 5543d36c2834..ec38cacb3d08 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1414,7 +1414,7 @@ config SMP
1414 depends on CPU_V6K || CPU_V7 1414 depends on CPU_V6K || CPU_V7
1415 depends on GENERIC_CLOCKEVENTS 1415 depends on GENERIC_CLOCKEVENTS
1416 depends on HAVE_SMP 1416 depends on HAVE_SMP
1417 depends on MMU 1417 depends on MMU || ARM_MPU
1418 select USE_GENERIC_SMP_HELPERS 1418 select USE_GENERIC_SMP_HELPERS
1419 help 1419 help
1420 This enables support for systems with more than one CPU. If you have 1420 This enables support for systems with more than one CPU. If you have
@@ -1435,7 +1435,7 @@ config SMP
1435 1435
1436config SMP_ON_UP 1436config SMP_ON_UP
1437 bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)" 1437 bool "Allow booting SMP kernel on uniprocessor systems (EXPERIMENTAL)"
1438 depends on SMP && !XIP_KERNEL 1438 depends on SMP && !XIP_KERNEL && MMU
1439 default y 1439 default y
1440 help 1440 help
1441 SMP kernels contain instructions which fail on non-SMP processors. 1441 SMP kernels contain instructions which fail on non-SMP processors.
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu
index c859495da480..db597e1c7572 100644
--- a/arch/arm/Kconfig-nommu
+++ b/arch/arm/Kconfig-nommu
@@ -50,3 +50,14 @@ config REMAP_VECTORS_TO_RAM
50 Otherwise, say 'y' here. In this case, the kernel will require 50 Otherwise, say 'y' here. In this case, the kernel will require
51 external support to redirect the hardware exception vectors to 51 external support to redirect the hardware exception vectors to
52 the writable versions located at DRAM_BASE. 52 the writable versions located at DRAM_BASE.
53
54config ARM_MPU
55 bool 'Use the ARM v7 PMSA Compliant MPU'
56 default y
57 help
58 Some ARM systems without an MMU have instead a Memory Protection
59 Unit (MPU) that defines the type and permissions for regions of
60 memory.
61
62 If your CPU has an MPU then you should choose 'y' here unless you
63 know that you do not want to use the MPU.