ARM: 7553/1: proc-v7: Ensure correct instruction set after cpu_reset
authorDave Martin <dave.martin@linaro.org>
Tue, 16 Oct 2012 10:54:00 +0000 (11:54 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 18 Oct 2012 10:03:34 +0000 (11:03 +0100)
commit153cd8e839b5729358d4e5c3371e7509ee5ac96a
tree627a7dae9d293350f7147b111e657929d75926bd
parentddffeb8c4d0331609ef2581d84de4d763607bd37
ARM: 7553/1: proc-v7: Ensure correct instruction set after cpu_reset

Because mov pc,<Rn> never switches instruction set when executed in
Thumb code, Thumb-2 kernels will silently execute the target code
after cpu_reset as Thumb code, even if the passed code pointer
denotes ARM (bit 0 clear).

This patch uses bx instead, ensuring the correct instruction set
for the target code.

Thumb code in the kernel is not supported prior to ARMv7, so other
CPUs are not affected.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mm/proc-v7.S