[lkml]   [2008]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH x86] [15/16] Force __cpuinit on for CONFIG_PM without HOTPLUG_CPU
On Mon, Jan 14, 2008 at 04:24:40PM +0100, Ingo Molnar wrote:
> * Ingo Molnar <> wrote:
> > also, in theory we've got a pretty reliable set of the following
> > information:
> >
> > function X references symbol Y
> >
> > and we know what type of sections they are in, right?
> >
> > could -ffunction-sections be used to delay the categorization of
> > functions to the link stage, and in essence remove the need to mark
> > functions via any of the __init markers?
> find below the current set of warnings on -git. There are 62.

The correct figure is 112.

You need to do a:
make KCFLAGS=-fno-unit-at-a-time
build to see them all.

> for example, instead of the rather cryptic:
> WARNING: vmlinux.o(.text+0x1815e): Section mismatch: reference to
> .init.text:calibrate_delay (between 'smp_callin' and '__cpu_up')
> the following output would be more informative:
> --------------------------------->
> | function:
> |
> | ./init/calibrate.c:void __devinit calibrate_delay(void)
> |
> | calls:
> |
> | ./arch/x86/kernel/smpboot_32.c:static void __cpuinit smp_callin(void)
> |
> | but calibrate_delay() is __devinit while smp_callin() is __cpuinit.
> | Change smp_callin() to __devinit to resolve this warning.
> |-------------------------------->
> would result in a lot faster cycles of fixing this.
> do we have all the info to print this?

Not yet. The patch I posted on lkml bring us one step further.
At modpost time today we only see .init.text and .text but
with the suggested patch we will be able to see what section
a function belong to and we are several steps closer to better
error messages.

So let me get that into shape and I will revisit the messages.

In this case I would not know if calibrate_delay() should be
__cpuinit or smp_callin() should be __devinit looking at the
information modpost has available without additional digging.
But a quick grep tells me that the right fix is to annotate
calibrate_delay() with __cpuinit because is is used from
either __cpuinit annotated or __init annotated functions.


 \ /
  Last update: 2008-01-14 21:15    [W:0.072 / U:7.200 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site