lkml.org 
[lkml]   [2008]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sections mismatches: How to mark new false positives?
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


Sam


\
 
 \ /
  Last update: 2008-01-29 19:17    [W:0.155 / U:1.268 seconds]
©2003-2014 Jasper Spaans. Advertise on this site