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

Flemming Richter Mikkelsen quatrox at member.fsf.org
Fri Sep 3 15:47:13 CEST 2010


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).




More information about the coreboot mailing list