[PATCH] arm: make kexec depend on MMU

From: Michal Hocko
Date: Fri Aug 25 2017 - 02:40:09 EST


arm nommu config with KEXEC enabled doesn't compile
arch/arm/kernel/setup.c: In function 'reserve_crashkernel':
arch/arm/kernel/setup.c:1005:25: error: 'SECTION_SIZE' undeclared (first
use in this function)
crash_size, SECTION_SIZE);

since 61603016e212 ("ARM: kexec: fix crashkernel= handling") which is
over one year without anybody noticing. I have only noticed beause of
my testing nommu config which somehow gained CONFIG_KEXEC without
an intention. This suggests that nobody is actually using KEXEC
on nommu ARM configs. It is even a question whether kexec works with
nommu.

Make KEXEC depend on MMU to make this clear. If somebody wants to enable
there will be probably more things to take care.

Signed-off-by: Michal Hocko <mhocko@xxxxxxxx>
---
arch/arm/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3f4aa9179337..c8603195d7fc 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2003,6 +2003,7 @@ config KEXEC
bool "Kexec system call (EXPERIMENTAL)"
depends on (!SMP || PM_SLEEP_SMP)
depends on !CPU_V7M
+ depends on MMU
select KEXEC_CORE
help
kexec is a system call that implements the ability to shutdown your
--
2.13.2

--
Michal Hocko
SUSE Labs