[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250327011312.mj55byrfatiprddh@master>
Date: Thu, 27 Mar 2025 01:13:12 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: kernel test robot <lkp@...el.com>
Cc: Masahiro Yamada <masahiroy@...nel.org>, oe-kbuild-all@...ts.linux.dev,
linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
Wei Yang <richard.weiyang@...il.com>
Subject: Re: WARNING: modpost: vmlinux: section mismatch in reference:
mm_cmdline_setup+0x94 (section: .text.unlikely) -> memblock (section:
.init.data)
On Mon, Mar 24, 2025 at 12:59:00PM +0800, kernel test robot wrote:
>tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>head: 586de92313fcab8ed84ac5f78f4d2aae2db92c59
>commit: 73db3abdca58c8a014ec4c88cf5ef925cbf63669 init/modpost: conditionally check section mismatch to __meminit*
Looks this is not the cause, after reverting this commit it still report
mismatch.
>date: 8 months ago
>config: microblaze-randconfig-r061-20250323 (https://download.01.org/0day-ci/archive/20250324/202503241259.kJV3U7Xj-lkp@intel.com/config)
>compiler: microblaze-linux-gcc (GCC) 10.5.0
>reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250324/202503241259.kJV3U7Xj-lkp@intel.com/reproduce)
>
>If you fix the issue in a separate patch/commit (i.e. not just a new version of
>the same patch/commit), kindly add following tags
>| Reported-by: kernel test robot <lkp@...el.com>
>| Closes: https://lore.kernel.org/oe-kbuild-all/202503241259.kJV3U7Xj-lkp@intel.com/
>
>All warnings (new ones prefixed by >>, old ones prefixed by <<):
>
>>> WARNING: modpost: vmlinux: section mismatch in reference: mm_cmdline_setup+0x94 (section: .text.unlikely) -> memblock (section: .init.data)
The reason for this is gcc put mm_cmdline_setup into .text.unlikely section.
Since it is only used by mmu_init() which is annotated by __init, I think the
proper way is to add __init to mm_cmdline_setup.
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;
--
Wei Yang
Help you, Help me
Powered by blists - more mailing lists