From: Adrian Bunk <bunk@kernel.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: sections mismatches: How to mark new false positives?
Date: Tue, 29 Jan 2008 21:00:46 +0200 [thread overview]
Message-ID: <20080129190046.GR8767@does.not.exist> (raw)
In-Reply-To: <20080129181305.GB14056@uranus.ravnborg.org>
On Tue, Jan 29, 2008 at 07:13:06PM +0100, Sam Ravnborg wrote:
> On Tue, Jan 29, 2008 at 07:02:55PM +0200, Adrian Bunk wrote:
> > I'm getting the following in the latest -git:
> >
> > <-- snip -->
> >
> > ...
> > WARNING: arch/x86/kernel/built-in.o(.exit.text+0x1db): Section mismatch in reference from the function msr_exit() to the variable .cpuinit.data:msr_class_cpu_notifier
> > ...
> >
> > <-- snip -->
> >
> > That's obviously a false positive (unregister_hotcpu_notifier() is a
> > noop if CONFIG_HOTPLUG_CPU=n), but how can I silence the warning?
>
> What is the purpose of __cpuinit?
> It seems to be used for two purposes:
>
> To annotate code that is used to initialize cpu's
> if CONFIG_HOTPLUG_CPU=n then discard it after
> init has completed
> if CONFIG_HOTPLUG_CPU=y then keep it
>
> To annotate all 'core' cpu hotplug related code
> if CONFIG_HOTPLUG_CPU=n then it is not used and
> can safely be discarded
> if CONFIG_HOTPLUG_CPU=y then keep it
>
> And the variable msr_class_cpu_notifier belongs to the last category.
> So the root cause of all the __cpu* related section mismatch
> warnings are the misuse of __cpuinit to mark all core functions.
>
> How are we going to fix this?
>
> I see a couple of possibilities:
>
> 1) annotate like hell to hide the misuse of __cpuinit
> 2) introduce __cpu to make cpu hotplug 'core' stuff
> 3) drop section mismatch checks for __cpu stuff
My main point is not related to __cpu*
E.g. look at the following warnings:
WARNING: drivers/pci/built-in.o(.text+0xa385): Section mismatch in
reference from the function cpci_configure_slot() to the function
.devinit.text:pci_do_scan_bus()
WARNING: drivers/pci/built-in.o(.text+0x13052): Section mismatch in
reference from the function cpqhp_configure_device() to the function
.devinit.text:pci_do_scan_bus()
WARNING: drivers/pci/built-in.o(.text+0x1561c): Section mismatch in
reference from the function ibm_configure_device() to the function
.devinit.text:pci_do_scan_bus()
WARNING: drivers/pci/built-in.o(.text+0x26176): Section mismatch in
reference from the function shpchp_configure_device() to the function
.devinit.text:pci_do_scan_bus()
The code seems to be 100% correct, but how can I silence the warnings
without needlessly bloating the kernel in the CONFIG_HOTPLUG=n case?
> Sam
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2008-01-29 19:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-29 17:02 sections mismatches: How to mark new false positives? Adrian Bunk
2008-01-29 18:13 ` Sam Ravnborg
2008-01-29 19:00 ` Adrian Bunk [this message]
2008-01-29 19:49 ` Sam Ravnborg
2008-01-29 21:56 ` Sam Ravnborg
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=20080129190046.GR8767@does.not.exist \
--to=bunk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.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