Re: [PATCH] [3/5] Mark complex bitops.h inlines as __always_inline

Andrew Morton
2009-01-06T00:03:30Z

On Mon, 5 Jan 2009 00:36:40 +0100 (CET)
Andi Kleen <andi@firstfloor.org> wrote:

> Hugh Dickins noticed that older gcc versions when the kernel
> is built for code size didn't inline some of the bitops.
>
> Mark all complex x86 bitops that have more than a single
> asm statement or two as always inline to avoid this problem.
>
> Probably should be done for other architectures too.
>

Well yes. This is why we did

#if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \
!defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4)
# define inline inline __attribute__((always_inline))
# define __inline__ __inline__ __attribute__((always_inline))
# define __inline __inline __attribute__((always_inline))
#endif

but people had to go and futz with it, make it complicated and break
stuff. Sigh.