MIPS: select ARCH_KEEP_MEMBLOCK unconditionally
Guenter Roeck
Tested-byQuoted 13 lines · Nick Desaulniers
While removing
allnoconfig_yfromKconfig, ARCH=mips allnoconfig builds started failing with the error:WARNING: modpost:
vmlinux.o(.text+0x9c70): Section mismatch in reference from the functionreserve_exception_space()to the function .meminit.text:memblock_reserve()
The functionreserve_exception_space()references the function__meminitmemblock_reserve().
This is often becausereserve_exception_spacelacks a__meminitannotation or the annotation ofmemblock_reserveis wrong.
ERROR: modpost: Section mismatches detected.
SetCONFIG_SECTION_MISMATCH_WARN_ONLY=yto allow them.
Quoted 6 lines
allnoconfig disables
DEBUG_KERNELand thusARCH_KEEP_MEMBLOCK, which changes__init_memblockto be equivalent to__meminittriggering the above error.Fixes commit a8c0f1c634507 ("MIPS: Select ARCH_KEEP_MEMBLOCK if
s/commit //
Quoted 4 lines
DEBUG_KERNELto enable sysfs memblock debug")Cc Masahiro Yamada <[email protected]>Reported-by Guenter Roeck <[email protected]>Signed-off-by Nick Desaulniers <[email protected]>
Guenter
Quoted 20 lines
--- arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/mips/Kconfig +1
-1@@ -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 64BITSignature · 1 line
2.31.1.295.g9ea45b61b8-goog