mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 08:34:20 +08:00
c8399943bd
Impact: reduce kernel image size
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.
Ingo then found a better fix that only requires
a single line change, but it unfortunately only
works on gcc 4.3.
On older gccs the original patch still makes a ~0.3% defconfig
difference with CONFIG_OPTIMIZE_INLINING=y.
With gcc 4.1 and a defconfig like build:
|
||
---|---|---|
.. | ||
__ffs.h | ||
__fls.h | ||
atomic.h | ||
ext2-atomic.h | ||
ext2-non-atomic.h | ||
ffs.h | ||
ffz.h | ||
find.h | ||
fls64.h | ||
fls.h | ||
hweight.h | ||
le.h | ||
lock.h | ||
minix-le.h | ||
minix.h | ||
non-atomic.h | ||
sched.h |