linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: make kexec depend on MMU
@ 2020-02-05 22:43 Stefan Agner
  2020-02-05 23:53 ` Russell King - ARM Linux admin
  2020-02-06 10:00 ` Vladimir Murzin
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Agner @ 2020-02-05 22:43 UTC (permalink / raw)
  To: linux
  Cc: arnd, linus.walleij, akpm, nsekhar, mchehab+samsung,
	bgolaszewski, armlinux, benjamin.gaignard, linux-arm-kernel,
	linux-kernel, Michal Hocko, Stefan Agner

From: Michal Hocko <mhocko@suse.com>

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@suse.com>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 96dab76da3b3..59ce8943151f 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1906,6 +1906,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.25.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm: make kexec depend on MMU
  2020-02-05 22:43 [PATCH] arm: make kexec depend on MMU Stefan Agner
@ 2020-02-05 23:53 ` Russell King - ARM Linux admin
  2020-02-06  0:10   ` Stefan Agner
  2020-02-06 10:00 ` Vladimir Murzin
  1 sibling, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux admin @ 2020-02-05 23:53 UTC (permalink / raw)
  To: Stefan Agner
  Cc: arnd, linus.walleij, akpm, nsekhar, mchehab+samsung,
	bgolaszewski, armlinux, benjamin.gaignard, linux-arm-kernel,
	linux-kernel, Michal Hocko

Does patch 8951/1, which has been merged into mainline, not fix this?

On Wed, Feb 05, 2020 at 11:43:44PM +0100, Stefan Agner wrote:
> From: Michal Hocko <mhocko@suse.com>
> 
> 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@suse.com>
> Reviewed-by: Stefan Agner <stefan@agner.ch>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  arch/arm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 96dab76da3b3..59ce8943151f 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1906,6 +1906,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.25.0
> 
> 

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm: make kexec depend on MMU
  2020-02-05 23:53 ` Russell King - ARM Linux admin
@ 2020-02-06  0:10   ` Stefan Agner
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Agner @ 2020-02-06  0:10 UTC (permalink / raw)
  To: Russell King - ARM Linux admin
  Cc: arnd, linus.walleij, akpm, nsekhar, mchehab+samsung,
	bgolaszewski, armlinux, benjamin.gaignard, linux-arm-kernel,
	linux-kernel, Michal Hocko

On 2020-02-06 00:53, Russell King - ARM Linux admin wrote:
> Does patch 8951/1, which has been merged into mainline, not fix this?

Yes, that should take care of it. 

I discussed end of last year with Michal about this, and back then that
patch wasn't around. Should have checked master before re-sending this
patch. Sorry for the noise.

--
Stefan


> On Wed, Feb 05, 2020 at 11:43:44PM +0100, Stefan Agner wrote:
>> From: Michal Hocko <mhocko@suse.com>
>>
>> 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@suse.com>
>> Reviewed-by: Stefan Agner <stefan@agner.ch>
>> Signed-off-by: Stefan Agner <stefan@agner.ch>
>> ---
>>  arch/arm/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> index 96dab76da3b3..59ce8943151f 100644
>> --- a/arch/arm/Kconfig
>> +++ b/arch/arm/Kconfig
>> @@ -1906,6 +1906,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.25.0
>>
>>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] arm: make kexec depend on MMU
  2020-02-05 22:43 [PATCH] arm: make kexec depend on MMU Stefan Agner
  2020-02-05 23:53 ` Russell King - ARM Linux admin
@ 2020-02-06 10:00 ` Vladimir Murzin
  1 sibling, 0 replies; 4+ messages in thread
From: Vladimir Murzin @ 2020-02-06 10:00 UTC (permalink / raw)
  To: Stefan Agner, linux
  Cc: Michal Hocko, arnd, linus.walleij, nsekhar, linux-kernel,
	bgolaszewski, benjamin.gaignard, mchehab+samsung, armlinux, akpm,
	linux-arm-kernel, Vincenzo Frascino

On 2/5/20 10:43 PM, Stefan Agner wrote:
> From: Michal Hocko <mhocko@suse.com>
> 
> 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@suse.com>
> Reviewed-by: Stefan Agner <stefan@agner.ch>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  arch/arm/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 96dab76da3b3..59ce8943151f 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1906,6 +1906,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
> 

Vincenzo sent similar patch [1] some time ago. I prefer his patch since CPU_V7M already imply !MMU.

[1] https://lore.kernel.org/linux-arm-kernel/20200110123125.51092-1-vincenzo.frascino@arm.com/T/

Cheers
Vladimir

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-06 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-05 22:43 [PATCH] arm: make kexec depend on MMU Stefan Agner
2020-02-05 23:53 ` Russell King - ARM Linux admin
2020-02-06  0:10   ` Stefan Agner
2020-02-06 10:00 ` Vladimir Murzin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).