linux/arch
Russell King 6ebbf2ce43 ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+
ARMv6 and greater introduced a new instruction ("bx") which can be used
to return from function calls.  Recent CPUs perform better when the
"bx lr" instruction is used rather than the "mov pc, lr" instruction,
and this sequence is strongly recommended to be used by the ARM
architecture manual (section A.4.1.1).

We provide a new macro "ret" with all its variants for the condition
code which will resolve to the appropriate instruction.

Rather than doing this piecemeal, and miss some instances, change all
the "mov pc" instances to use the new macro, with the exception of
the "movs" instruction and the kprobes code.  This allows us to detect
the "mov pc, lr" case and fix it up - and also gives us the possibility
of deploying this for other registers depending on the CPU selection.

Reported-by: Will Deacon <will.deacon@arm.com>
Tested-by: Stephen Warren <swarren@nvidia.com> # Tegra Jetson TK1
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> # mioa701_bootresume.S
Tested-by: Andrew Lunn <andrew@lunn.ch> # Kirkwood
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Tested-by: Tony Lindgren <tony@atomide.com> # OMAPs
Tested-by: Gregory CLEMENT <gregory.clement@free-electrons.com> # Armada XP, 375, 385
Acked-by: Sekhar Nori <nsekhar@ti.com> # DaVinci
Acked-by: Christoffer Dall <christoffer.dall@linaro.org> # kvm/hyp
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com> # PXA3xx
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> # Xen
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> # ARMv7M
Tested-by: Simon Horman <horms+renesas@verge.net.au> # Shmobile
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2014-07-18 12:29:04 +01:00
..
alpha Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
arc ARC: [SMP] Enable icache coherency 2014-06-26 11:59:01 +05:30
arm ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ 2014-07-18 12:29:04 +01:00
arm64 arm64: mm: remove broken &= operator from pmd_mknotpresent 2014-06-18 16:34:30 +01:00
avr32 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next 2014-06-03 12:57:53 -07:00
blackfin blackfin updates for Linux 3.16 2014-06-12 20:08:47 -07:00
c6x DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
cris cris: update comments for generic idle conversion 2014-06-06 16:08:18 -07:00
frv sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
hexagon
ia64 ia64: arch/ia64/include/uapi/asm/fcntl.h needs personality.h 2014-06-23 16:47:44 -07:00
m32r
m68k Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
metag Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
microblaze Microblaze patches for 3.16-rc1 2014-06-05 16:15:33 -07:00
mips MIPS: Lasat: Fix build error if CRC32 is not enabled. 2014-06-26 14:43:01 +01:00
mn10300 sys_sgetmask/sys_ssetmask: add CONFIG_SGETMASK_SYSCALL 2014-06-04 16:54:14 -07:00
openrisc DeviceTree for 3.16: 2014-06-04 10:02:38 -07:00
parisc Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
powerpc powerpc: Don't skip ePAPR spin-table CPUs 2014-06-25 13:10:49 +10:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2014-06-21 06:47:01 -10:00
score
sh Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
sparc nmi: provide the option to issue an NMI back trace to every cpu but current 2014-06-23 16:47:44 -07:00
tile Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
um Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2014-06-12 21:23:38 -07:00
unicore32 unicore32: Remove ARCH_HAS_CPUFREQ config option 2014-06-20 08:22:41 +08:00
x86 Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-06-27 18:43:03 -07:00
xtensa Merge commit '3cf2f34' into sched/core, to fix build error 2014-06-12 13:46:37 +02:00
.gitignore
Kconfig