Re: [git pull] sparseirq / irq updates for v2.6.29

Ingo Molnar
2008-12-29T09:34:55Z

* Yinghai Lu <yinghai@kernel.org> wrote:

> On Sun, Dec 28, 2008 at 3:55 PM, H. Peter Anvin <hpa@zytor.com> wrote:
> > Ingo Molnar wrote:
> >>
> >> ok, agreed. I was hoping for some more generic workaround but nothing
> >> seemed to keep gcc from inlining such functions.
> >>
> >
> > Other than blacklisting those gcc versions. It's pretty easy to
> > understand how a bug like that could creep in, since one of the main
> > improvements of the early gcc4 series was better inlining as an
> > optimization.
>
> 1. one time path add one dummy printk

dummy printks are not a good idea at all. Often the weak versions are the
ones that get used and it would be very annoying if there was a per boot
(or even per syscall!) 'dummy printk'.

> 2. multi path, could move it to another file.
> could add one like kernel/weak.c to collect those ...

that pretty much removes the advantages of __weak symbols: to provide
default implementations for various functionality, without having to do
#ifdefs. The default implementation will often want to be near the usage
site - so these bugs will reoccur again and again.

Ingo