arch/microblaze/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
As reported by lkp, there is a section mismatch of mm_cmdline_setup() and
memblock. The reason is we don't specify the section of mm_cmdline_setup()
and gcc put it into .text.unlikely.
As mm_cmdline_setup() is only used in mmu_init(), which is in .init.text
section, put mm_cmdline_setup() into it too.
Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
CC: Masahiro Yamada <masahiroy@kernel.org>
CC: Andrew Morton <akpm@linux-foundation.org>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202503241259.kJV3U7Xj-lkp@intel.com/
---
arch/microblaze/mm/init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 4520c5741579..e98cfaf1c62b 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -143,7 +143,7 @@ int page_is_ram(unsigned long pfn)
/*
* Check for command-line options that affect what MMU_init will do.
*/
-static void mm_cmdline_setup(void)
+static void __init mm_cmdline_setup(void)
{
unsigned long maxmem = 0;
char *p = cmd_line;
--
2.34.1
On Fri, Mar 28, 2025 at 01:01:36AM +0000, Wei Yang wrote: > As reported by lkp, there is a section mismatch of mm_cmdline_setup() and > memblock. The reason is we don't specify the section of mm_cmdline_setup() > and gcc put it into .text.unlikely. > > As mm_cmdline_setup() is only used in mmu_init(), which is in .init.text > section, put mm_cmdline_setup() into it too. > > Signed-off-by: Wei Yang <richard.weiyang@gmail.com> > CC: Masahiro Yamada <masahiroy@kernel.org> > CC: Andrew Morton <akpm@linux-foundation.org> > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202503241259.kJV3U7Xj-lkp@intel.com/ Reviewed-by: Oscar Salvador <osalvador@suse.de> -- Oscar Salvador SUSE Labs
© 2016 - 2025 Red Hat, Inc.