[coreboot] [PATCH] fix 'AMD Fam10 code breaks with gcc 4.5.0'

Myles Watson mylesgw at gmail.com
Fri Sep 3 16:46:39 CEST 2010

On Fri, Sep 3, 2010 at 7:47 AM, Flemming Richter Mikkelsen
<quatrox at member.fsf.org> wrote:
> On 2010-09-02, Myles Watson <mylesgw at gmail.com> wrote:
>> > Root cause: After function STOP_CAR_AND_CPU disables cache as
>> > ram, the cache as ram stack can no longer be used. Called
>> > functions must be inlined to avoid stack usage. Also, the
>> > compiler must keep local variables register based and not
>> > allocated them from the stack. With gcc 4.5.0, some functions
>> > declared as inline are not being inlined. This patch forces
>> > these functions to always be inlined by adding the qualifier
>> > __attribute__((always_inline)) to their declaration.
>> Should we do something like
>> #define INLINE __attribute__((always_inline))
>> and replace all (or most) inline directives with INLINE?  There are
>> probably other places where the code depends on inline working.
> gcc supports -Winline and this warning should, if not already, be
> enabled by default (in the Makefiles).

It isn't.  Tyan s2895 has 27 warnings just in romstage.c when -Winline
is specified.


More information about the coreboot mailing list