linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: select ARCH_KEEP_MEMBLOCK unconditionally
@ 2021-04-07 17:35 Nick Desaulniers
  2021-04-07 17:39 ` Masahiro Yamada
  2021-04-23 12:11 ` Thomas Bogendoerfer
  0 siblings, 2 replies; 4+ messages in thread
From: Nick Desaulniers @ 2021-04-07 17:35 UTC (permalink / raw)
  To: Thomas Bogendoerfer
  Cc: Linux Kbuild mailing list, Nick Desaulniers, Masahiro Yamada,
	Guenter Roeck, linux-mips, linux-kernel

While removing allnoconfig_y from Kconfig, ARCH=mips allnoconfig builds
started failing with the error:

WARNING: modpost: vmlinux.o(.text+0x9c70): Section mismatch in reference
from the function reserve_exception_space() to the function
.meminit.text:memblock_reserve()
The function reserve_exception_space() references the function __meminit
memblock_reserve().
This is often because reserve_exception_space lacks a __meminit
annotation or the annotation of memblock_reserve is wrong.
ERROR: modpost: Section mismatches detected.
Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.

allnoconfig disables DEBUG_KERNEL and thus ARCH_KEEP_MEMBLOCK, which
changes __init_memblock to be equivalent to __meminit triggering the
above error.

Link: https://lore.kernel.org/linux-kbuild/20210313194836.372585-11-masahiroy@kernel.org/
Fixes: commit a8c0f1c634507 ("MIPS: Select ARCH_KEEP_MEMBLOCK if
DEBUG_KERNEL to enable sysfs memblock debug")
Cc: Masahiro Yamada <masahiroy@kernel.org>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 arch/mips/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e9893cd34992..702648f60e41 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -12,7 +12,7 @@ config MIPS
 	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
 	select ARCH_HAS_UBSAN_SANITIZE_ALL
 	select ARCH_HAS_GCOV_PROFILE_ALL
-	select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL
+	select ARCH_KEEP_MEMBLOCK
 	select ARCH_SUPPORTS_UPROBES
 	select ARCH_USE_BUILTIN_BSWAP
 	select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
-- 
2.31.1.295.g9ea45b61b8-goog


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

* Re: [PATCH] MIPS: select ARCH_KEEP_MEMBLOCK unconditionally
  2021-04-07 17:35 [PATCH] MIPS: select ARCH_KEEP_MEMBLOCK unconditionally Nick Desaulniers
@ 2021-04-07 17:39 ` Masahiro Yamada
  2021-04-23 12:11 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2021-04-07 17:39 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Thomas Bogendoerfer, Linux Kbuild mailing list, Guenter Roeck,
	linux-mips, Linux Kernel Mailing List

On Thu, Apr 8, 2021 at 2:35 AM Nick Desaulniers <ndesaulniers@google.com> wrote:
>
> While removing allnoconfig_y from Kconfig, ARCH=mips allnoconfig builds
> started failing with the error:
>
> WARNING: modpost: vmlinux.o(.text+0x9c70): Section mismatch in reference
> from the function reserve_exception_space() to the function
> .meminit.text:memblock_reserve()
> The function reserve_exception_space() references the function __meminit
> memblock_reserve().
> This is often because reserve_exception_space lacks a __meminit
> annotation or the annotation of memblock_reserve is wrong.
> ERROR: modpost: Section mismatches detected.
> Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
>
> allnoconfig disables DEBUG_KERNEL and thus ARCH_KEEP_MEMBLOCK, which
> changes __init_memblock to be equivalent to __meminit triggering the
> above error.
>
> Link: https://lore.kernel.org/linux-kbuild/20210313194836.372585-11-masahiroy@kernel.org/
> Fixes: commit a8c0f1c634507 ("MIPS: Select ARCH_KEEP_MEMBLOCK if
> DEBUG_KERNEL to enable sysfs memblock debug")
> Cc: Masahiro Yamada <masahiroy@kernel.org>

Please replace it with:

Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>

Thanks.



> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
>  arch/mips/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index e9893cd34992..702648f60e41 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -12,7 +12,7 @@ config MIPS
>         select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
>         select ARCH_HAS_UBSAN_SANITIZE_ALL
>         select ARCH_HAS_GCOV_PROFILE_ALL
> -       select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL
> +       select ARCH_KEEP_MEMBLOCK
>         select ARCH_SUPPORTS_UPROBES
>         select ARCH_USE_BUILTIN_BSWAP
>         select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
> --
> 2.31.1.295.g9ea45b61b8-goog
>


--
Best Regards
Masahiro Yamada

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

* Re: [PATCH] MIPS: select ARCH_KEEP_MEMBLOCK unconditionally
  2021-04-07 17:35 [PATCH] MIPS: select ARCH_KEEP_MEMBLOCK unconditionally Nick Desaulniers
  2021-04-07 17:39 ` Masahiro Yamada
@ 2021-04-23 12:11 ` Thomas Bogendoerfer
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2021-04-23 12:11 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Linux Kbuild mailing list, Masahiro Yamada, Guenter Roeck,
	linux-mips, linux-kernel

On Wed, Apr 07, 2021 at 10:35:43AM -0700, Nick Desaulniers wrote:
> While removing allnoconfig_y from Kconfig, ARCH=mips allnoconfig builds
> started failing with the error:
> 
> WARNING: modpost: vmlinux.o(.text+0x9c70): Section mismatch in reference
> from the function reserve_exception_space() to the function
> .meminit.text:memblock_reserve()
> The function reserve_exception_space() references the function __meminit
> memblock_reserve().
> This is often because reserve_exception_space lacks a __meminit
> annotation or the annotation of memblock_reserve is wrong.
> ERROR: modpost: Section mismatches detected.
> Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
> 
> allnoconfig disables DEBUG_KERNEL and thus ARCH_KEEP_MEMBLOCK, which
> changes __init_memblock to be equivalent to __meminit triggering the
> above error.
> 
> Link: https://lore.kernel.org/linux-kbuild/20210313194836.372585-11-masahiroy@kernel.org/
> Fixes: commit a8c0f1c634507 ("MIPS: Select ARCH_KEEP_MEMBLOCK if
> DEBUG_KERNEL to enable sysfs memblock debug")
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
> ---
>  arch/mips/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

applied to mips-next. I've dropped the Fixes tag, because it doesn't
fix this commit. Sidenode wouldn't it make sence to make 
reserve_exception_space() as __meminit ?

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH] MIPS: select ARCH_KEEP_MEMBLOCK unconditionally
@ 2021-04-07 17:46 Guenter Roeck
  0 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2021-04-07 17:46 UTC (permalink / raw)
  To: Nick Desaulniers
  Cc: Thomas Bogendoerfer, Linux Kbuild mailing list, Masahiro Yamada,
	linux-mips, linux-kernel

On Wed, Apr 07, 2021 at 10:35:43AM -0700, Nick Desaulniers wrote:
> While removing allnoconfig_y from Kconfig, ARCH=mips allnoconfig builds
> started failing with the error:
> 
> WARNING: modpost: vmlinux.o(.text+0x9c70): Section mismatch in reference
> from the function reserve_exception_space() to the function
> .meminit.text:memblock_reserve()
> The function reserve_exception_space() references the function __meminit
> memblock_reserve().
> This is often because reserve_exception_space lacks a __meminit
> annotation or the annotation of memblock_reserve is wrong.
> ERROR: modpost: Section mismatches detected.
> Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them.
> 
> allnoconfig disables DEBUG_KERNEL and thus ARCH_KEEP_MEMBLOCK, which
> changes __init_memblock to be equivalent to __meminit triggering the
> above error.
> 
> Link: https://lore.kernel.org/linux-kbuild/20210313194836.372585-11-masahiroy@kernel.org/
> Fixes: commit a8c0f1c634507 ("MIPS: Select ARCH_KEEP_MEMBLOCK if

s/commit //

> DEBUG_KERNEL to enable sysfs memblock debug")
> Cc: Masahiro Yamada <masahiroy@kernel.org>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>

Tested-by: Guenter Roeck <linux@roeck-us.net>

Guenter

> ---
>  arch/mips/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
> index e9893cd34992..702648f60e41 100644
> --- a/arch/mips/Kconfig
> +++ b/arch/mips/Kconfig
> @@ -12,7 +12,7 @@ config MIPS
>  	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
>  	select ARCH_HAS_UBSAN_SANITIZE_ALL
>  	select ARCH_HAS_GCOV_PROFILE_ALL
> -	select ARCH_KEEP_MEMBLOCK if DEBUG_KERNEL
> +	select ARCH_KEEP_MEMBLOCK
>  	select ARCH_SUPPORTS_UPROBES
>  	select ARCH_USE_BUILTIN_BSWAP
>  	select ARCH_USE_CMPXCHG_LOCKREF if 64BIT
> -- 
> 2.31.1.295.g9ea45b61b8-goog
> 

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

end of thread, other threads:[~2021-04-23 12:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 17:35 [PATCH] MIPS: select ARCH_KEEP_MEMBLOCK unconditionally Nick Desaulniers
2021-04-07 17:39 ` Masahiro Yamada
2021-04-23 12:11 ` Thomas Bogendoerfer
2021-04-07 17:46 Guenter Roeck

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).