2020-01-10 12:34:22

by Vincenzo Frascino

[permalink] [raw]
Subject: [PATCH] arm: Fix Kexec compilation issue.

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.

Cc: Russell King <[email protected]>
Signed-off-by: Vincenzo Frascino <[email protected]>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index ba75e3661a41..bc99582bdc85 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1904,7 +1904,7 @@ config XIP_DEFLATED_DATA
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.24.1


2020-01-14 13:45:43

by Vladimir Murzin

[permalink] [raw]
Subject: Re: [PATCH] arm: Fix Kexec compilation issue.

On 1/10/20 12:31 PM, Vincenzo Frascino wrote:
> 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.
>
> Cc: Russell King <[email protected]>
> Signed-off-by: Vincenzo Frascino <[email protected]>
> ---
> arch/arm/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index ba75e3661a41..bc99582bdc85 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1904,7 +1904,7 @@ config XIP_DEFLATED_DATA
> 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
>

Reviewed-by: Vladimir Murzin <[email protected]>

Cheers
Vladimir