]> git.hungrycats.org Git - linux/commit
ARM: 8383/1: nommu: avoid deprecated source register on mov
authorStefan Agner <stefan@agner.ch>
Tue, 2 Jun 2015 19:43:24 +0000 (20:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 30 Apr 2017 03:49:17 +0000 (05:49 +0200)
commit12ebe5ca67dc8743d8cba7ef2019a2f72bb480b7
treea409edd196e47f866baeab92b4eaadaad6622d48
parent39541d00f20c8f89667d257de3a5464b3f73be49
ARM: 8383/1: nommu: avoid deprecated source register on mov

commit 970d96f9a81b0dd83ddd8bce0e5e1ba31881c5f5 upstream.

In Thumb2 mode, the stack register r13 is deprecated if the
destination register is the program counter (r15). Similar to
head.S, head-nommu.S uses r13 to store the return address used
after configuring the CPU's CP15 register. However, since we do
not enable a MMU, there will be no address switch and it is
possible to use branch with link instruction to call
__after_proc_init.

Avoid using r13 completely by using bl to call __after_proc_init
and get rid of __secondary_switched.

Beside removing unnecessary complexity, this also fixes a
compiler warning when compiling a !MMU kernel:
Warning: Use of r13 as a source register is deprecated when r15
is the destination register.

Tested-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/kernel/head-nommu.S