linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Wei Yang <richard.weiyang@gmail.com>
To: kernel test robot <lkp@intel.com>
Cc: Masahiro Yamada <masahiroy@kernel.org>,
	oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Wei Yang <richard.weiyang@gmail.com>
Subject: Re: WARNING: modpost: vmlinux: section mismatch in reference: mm_cmdline_setup+0x94 (section: .text.unlikely) -> memblock (section: .init.data)
Date: Thu, 27 Mar 2025 01:13:12 +0000	[thread overview]
Message-ID: <20250327011312.mj55byrfatiprddh@master> (raw)
In-Reply-To: <202503241259.kJV3U7Xj-lkp@intel.com>

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@intel.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


  reply	other threads:[~2025-03-27  1:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24  4:59 kernel test robot
2025-03-27  1:13 ` Wei Yang [this message]
2025-03-27 19:36   ` Andrew Morton
2025-03-28  0:55     ` Wei Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250327011312.mj55byrfatiprddh@master \
    --to=richard.weiyang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=masahiroy@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox