[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.0911191652430.2793@localhost.localdomain>
Date: Thu, 19 Nov 2009 16:59:37 -0800 (PST)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Thomas Gleixner <tglx@...utronix.de>
cc: Jeff Law <law@...hat.com>, rostedt@...dmis.org,
"H. Peter Anvin" <hpa@...or.com>,
David Daney <ddaney@...iumnetworks.com>,
Andrew Haley <aph@...hat.com>,
Richard Guenther <richard.guenther@...il.com>,
Ingo Molnar <mingo@...e.hu>,
LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Heiko Carstens <heiko.carstens@...ibm.com>,
feng.tang@...el.com, Fr??d??ric Weisbecker <fweisbec@...il.com>,
Peter Zijlstra <peterz@...radead.org>, jakub@...hat.com,
gcc@....gnu.org
Subject: Re: BUG: GCC-4.4.x changes the function frame on some functions
On Fri, 20 Nov 2009, Thomas Gleixner wrote:
>
> While testing various kernel configs we found out that the problem
> comes and goes. Finally I started to compare the gcc command line
> options and after some fiddling it turned out that the following
> minimal deltas change the code generator behaviour:
>
> Bad: -march=pentium-mmx -Wa,-mtune=generic32
> Good: -march=i686 -mtune=generic -Wa,-mtune=generic32
> Good: -march=pentium-mmx -mtune-generic -Wa,-mtune=generic32
>
> I'm not supposed to understand the logic behind that, right ?
Are you sure it's just the compiler flags?
There's another configuration portion: the size of the alignment itself.
That's dependent on L1_CACHE_SHIFT, which in turn is taken from the kernel
config CONFIG_X86_L1_CACHE_SHIFT.
Maybe that value matters too - for example maybe gcc will not try to align
the stack if it's big?
[ Btw, looking at that, why are X86_L1_CACHE_BYTES and X86_L1_CACHE_SHIFT
totally unrelated numbers? Very confusing. ]
The compiler flags we use are tied to some of the same choices that choose
the cache shift, so the correlation you found while debugging this would
still hold.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists