Re: [PATCH x86] [15/16] Force __cpuinit on for CONFIG_PM without HOTPLUG_CPU

From: Sam Ravnborg
Date: Tue Jan 15 2008 - 13:21:53 EST


> >
> > The plan is to let section mismatch warnings become errors
> > after the merge window - so we hit -mm first.
>
> A lot of those I look at seem to be not really bugs; also my
> impression is that they sometimes crop up randomly. e.g. you
> change something completely unrelated and suddenly you get
> a section warning somewhere else.
I have fixed a lot of these warnings.
And when I look closer at them they are explainable.

The warnings are today very dependent on the configuration
and the inlining that gcc uses.
With default options to gcc my .config produces ~65 warnings
but with -fno-unit-a-time I get 112 warnings.
Solely due to less inlining done by gcc.

So there are two sources for the 'randomization':
a) The actual config
b) The sometimes agressive inlining

a) will be addressed by having separate sections for each
__init* type that is at link time combined where it belongs.

b) is addressed by a Kernel Hacking option which
1) uses -fno-unit-at-a-time to get less gcc inlining
2) maybe make all __*init function no-inline
3) maybe disable inlining globally

> > And I will add a config option to:
> > - set -fno-unit-at-a-time
>
> I was told future gcc versions would remove that. Why do you
> want it?
Are there any better way to tell gcc no to inline so agressively?

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/