mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ARM: don't discard memblock for kexec
@ 2017-10-11 13:48 Arnd Bergmann
  2017-10-11 14:41 ` Nicolas Pitre
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-10-11 13:48 UTC (permalink / raw)
  To: Russell King
  Cc: Arnd Bergmann, Nicolas Pitre, Ard Biesheuvel, linux-arm-kernel,
	linux-kernel

Discarding the memblock arrays usually works, but causes problems
with kexec, as pointed out by this kbuild warning:

WARNING: vmlinux.o(.text+0x7c60): Section mismatch in reference from the function machine_kexec_prepare() to the function .meminit.text:memblock_is_region_memory()

This lets us keep the memblock structures around whenever kexec
is enabled, but otherwise still drops them.

Fixes: cf1b09908a23 ("ARM: 8693/1: discard memblock arrays when possible")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 75b8c7e79ebc..90922a090501 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -2,7 +2,7 @@ config ARM
 	bool
 	default y
 	select ARCH_CLOCKSOURCE_DATA
-	select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID
+	select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC
 	select ARCH_HAS_DEBUG_VIRTUAL
 	select ARCH_HAS_DEVMEM_IS_ALLOWED
 	select ARCH_HAS_ELF_RANDOMIZE
-- 
2.9.0

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

* Re: [PATCH] ARM: don't discard memblock for kexec
  2017-10-11 13:48 [PATCH] ARM: don't discard memblock for kexec Arnd Bergmann
@ 2017-10-11 14:41 ` Nicolas Pitre
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Pitre @ 2017-10-11 14:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Russell King, Ard Biesheuvel, linux-arm-kernel, linux-kernel

On Wed, 11 Oct 2017, Arnd Bergmann wrote:

> Discarding the memblock arrays usually works, but causes problems
> with kexec, as pointed out by this kbuild warning:
> 
> WARNING: vmlinux.o(.text+0x7c60): Section mismatch in reference from the function machine_kexec_prepare() to the function .meminit.text:memblock_is_region_memory()
> 
> This lets us keep the memblock structures around whenever kexec
> is enabled, but otherwise still drops them.
> 
> Fixes: cf1b09908a23 ("ARM: 8693/1: discard memblock arrays when possible")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Nicolas Pitre <nico@linaro.org>

> ---
>  arch/arm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 75b8c7e79ebc..90922a090501 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -2,7 +2,7 @@ config ARM
>  	bool
>  	default y
>  	select ARCH_CLOCKSOURCE_DATA
> -	select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID
> +	select ARCH_DISCARD_MEMBLOCK if !HAVE_ARCH_PFN_VALID && !KEXEC
>  	select ARCH_HAS_DEBUG_VIRTUAL
>  	select ARCH_HAS_DEVMEM_IS_ALLOWED
>  	select ARCH_HAS_ELF_RANDOMIZE
> -- 
> 2.9.0
> 
> 

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

end of thread, other threads:[~2017-10-11 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-11 13:48 [PATCH] ARM: don't discard memblock for kexec Arnd Bergmann
2017-10-11 14:41 ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®