Commit ace24fce authored by Vincenzo Frascino's avatar Vincenzo Frascino Committed by Kelsey Skunberg

ARM: 8951/1: Fix Kexec compilation issue.

BugLink: https://bugs.launchpad.net/bugs/1868627

[ Upstream commit 76950f71 ]

To perform the reserve_crashkernel() operation kexec uses SECTION_SIZE to
find a memblock in a range.
SECTION_SIZE is not defined for nommu systems. Trying to compile kexec in
these conditions results in a build error:

  linux/arch/arm/kernel/setup.c: In function ‘reserve_crashkernel’:
  linux/arch/arm/kernel/setup.c:1016:25: error: ‘SECTION_SIZE’ undeclared
     (first use in this function); did you mean ‘SECTIONS_WIDTH’?
             crash_size, SECTION_SIZE);
                         ^~~~~~~~~~~~
                         SECTIONS_WIDTH
  linux/arch/arm/kernel/setup.c:1016:25: note: each undeclared identifier
     is reported only once for each function it appears in
  linux/scripts/Makefile.build:265: recipe for target 'arch/arm/kernel/setup.o'
     failed

Make KEXEC depend on MMU to fix the compilation issue.
Signed-off-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarKelsey Skunberg <kelsey.skunberg@canonical.com>
parent b0abc39b
...@@ -2000,7 +2000,7 @@ config XIP_PHYS_ADDR ...@@ -2000,7 +2000,7 @@ config XIP_PHYS_ADDR
config KEXEC config KEXEC
bool "Kexec system call (EXPERIMENTAL)" bool "Kexec system call (EXPERIMENTAL)"
depends on (!SMP || PM_SLEEP_SMP) depends on (!SMP || PM_SLEEP_SMP)
depends on !CPU_V7M depends on MMU
select KEXEC_CORE select KEXEC_CORE
help help
kexec is a system call that implements the ability to shutdown your kexec is a system call that implements the ability to shutdown your
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment