]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Get rid of branches to .subsections.
authorRalf Baechle <ralf@linux-mips.org>
Fri, 29 Oct 2010 18:08:24 +0000 (19:08 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 29 Oct 2010 18:08:24 +0000 (19:08 +0100)
commite903dd26add38375f8e0a0eb9b99599d660493a3
treede137b1d2945d2490bc1dcdf6d76eac6006f7ab0
parent0b2510a0244324aaccacac536e0dfc78dad77f08
MIPS: Get rid of branches to .subsections.

It was a nice optimization - on paper at least.  In practice it results in
branches that may exceed the maximum legal range for a branch.  We can
fight that problem with -ffunction-sections but -ffunction-sections again
is incompatible with -pg used by the function tracer.

By rewriting the loop around all simple LL/SC blocks to C we reduce the
amount of inline assembler and at the same time allow GCC to often fill
the branch delay slots with something sensible or whatever else clever
optimization it may have up in its sleeve.

With this optimization gone we also no longer need -ffunction-sections,
so drop it.

This optimization was originally introduced in 2.6.21, commit
5999eca25c1fd4b9b9aca7833b04d10fe4bc877d (linux-mips.org) rsp.
d6cdec148cab479899fa5cb9817e5711330ae8ee (kernel.org).

Original fix for the issues which caused me to pull this optimization by
Paul Gortmaker <paul.gortmaker@windriver.com>.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/Makefile
arch/mips/include/asm/atomic.h
arch/mips/include/asm/bitops.h
arch/mips/include/asm/cmpxchg.h
arch/mips/include/asm/system.h