diff mbox series

microblaze/mm: put mm_cmdline_setup() in .init.text section

Message ID 20250328010136.13139-1-richard.weiyang@gmail.com (mailing list archive)
State New
Headers show
Series microblaze/mm: put mm_cmdline_setup() in .init.text section | expand

Commit Message

Wei Yang March 28, 2025, 1:01 a.m. UTC
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(-)

Comments

Oscar Salvador March 28, 2025, 12:59 p.m. UTC | #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>
diff mbox series

Patch

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;