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

From: Andrew Morton
Date: Mon Jan 05 2009 - 19:03:29 EST


On Mon, 5 Jan 2009 00:36:40 +0100 (CET)
Andi Kleen <andi@xxxxxxxxxxxxxx> 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.

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