mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: Jianpeng Ma <majianpeng@gmail.com>, Tom Rini <trini@ti.com>,
	Rusty Russell <rusty@rustcorp.com.au>
Cc: tglx@linutronix.de, x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: compile x86_64 waring
Date: Wed, 24 Jul 2013 23:05:12 +0200	[thread overview]
Message-ID: <1374699912.29835.8.camel@x61.thuisdomein> (raw)
In-Reply-To: <201307051956052638321@gmail.com>

[Added Tom and Rusty because they might be able to say what's really
going on here.]

On Fri, 2013-07-05 at 19:56 +0800, majianpeng wrote:
> Compile x86_64 meet those messages:
> WARNING: arch/x86/mm/built-in.o(.text.unlikely+0xbf8): Section mismatch in reference from the function __node_set.constprop.0() to the variable .init.data:numa_nodes_parsed
> The function __node_set.constprop.0() references
> the variable __initdata numa_nodes_parsed.
> This is often because __node_set.constprop.0 lacks a __initdata 
> annotation or the annotation of numa_nodes_parsed is wrong.
> 
> WARNING: arch/x86/built-in.o(.text.unlikely+0x171d): Section mismatch in reference from the function __node_set.constprop.0() to the variable .init.data:numa_nodes_parsed
> The function __node_set.constprop.0() references
> the variable __initdata numa_nodes_parsed.
> This is often because __node_set.constprop.0 lacks a __initdata 
> annotation or the annotation of numa_nodes_parsed is wrong.

0) I noticed these too, on v3.11-rc1 and v3.12.-rc2. I assume Jianpeng
Ma reported these for a linux-next release that preceded v3.11-rc1.

1) The only hits for node_set and numa_nodes_parsed in arch/x86/mm are
in amdtopology.c, numa.c, and srat.c. If I peek at the object files
generated for these three files I notice that numa.o and srat.o have
node_set() in their .text.unlikely section. (amdtopology.o doesn't have
a .text.unlikely section.) 

2) I guess that since commit 06df44ee41442d83be061c5fd1b1de4f5fc6fbbf
("modpost.c: Add .text.unlikely to TEXT_SECTIONS"), which was included
in v3.11-rc1, code in .text.unlikely sections generates a mismatch
warning if it references __initdata code (and numa_nodes_parsed is
__initdata). But all calls of node_set() in these two files are from
within functions that are marked __init. And I think references from
__init code to __initdata code shouldn't lead to mismatch warnings,
should they?

3) So this looks like a false positive to me (but I'm not at all
familiar with, well, the section mismatch checks). Would there be a way
to silence this warning? Other than dropping __initdata from
numa_nodes_parsed, of course.


Paul Bolle


  reply	other threads:[~2013-07-24 21:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-05 11:56 majianpeng
2013-07-24 21:05 ` Paul Bolle [this message]
2013-07-24 23:22   ` Tom Rini
2013-07-25  8:53     ` Paul Bolle
2013-07-25  9:41       ` Paul Bolle
2013-07-25 12:17         ` Tom Rini
2013-10-30 13:04           ` Leon Gorge

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=1374699912.29835.8.camel@x61.thuisdomein \
    --to=pebolle@tiscali.nl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=majianpeng@gmail.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tglx@linutronix.de \
    --cc=trini@ti.com \
    --cc=x86@kernel.org \
    /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

all inboxes | Powered by JetHome®