Re: [GIT PULL] x86 LTO changes for v3.15

From: Andi Kleen
Date: Mon Mar 31 2014 - 19:04:44 EST


> So I think that adding "visible" to asmlinkage is actively wrong and
> misguided. And the compiler even told you so, but somebody then chose
> to ignore the compiler telling them that they did stupid things.

Hi Linus,

In principle you're right. asmlinkage does not mean visible today.

However with LTO pretty much all asmlinkages have to become
visible, as they are used by assembler code and we need to
tell that to the compiler, otherwise it'll optimize it away.

So I abused asmlinkage for this.

The alternative would be to add __visible everywhere we
have asmlinkage today. I thought it was the lesser evil
to just add it implicitly.

If you prefer to do it explicitely I can send
patches (it would be a very mechanic, long and boring
tree sweep ...).

I can send patches for the warnings. Usually the code
throwing warnings for this has some issue anyways,
or the asmlinkage is not really needed.

Please let me know what you prefer.

-Andi
--
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/