[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+
- To: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
- From: Shawn Guo <shawn.guo@xxxxxxxxxxxxx>
- Date: Wed, 2 Jul 2014 13:10:27 +0800
- Cc: Andrew Lunn <andrew@xxxxxxx>, kvm@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>, Sekhar Nori <nsekhar@xxxxxx>, linux-tegra@xxxxxxxxxxxxxxx, Thierry Reding <thierry.reding@xxxxxxxxx>, kvmarm@xxxxxxxxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx, Kukjin Kim <kgene.kim@xxxxxxxxxxx>, Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Magnus Damm <magnus.damm@xxxxxxxxx>, Gleb Natapov <gleb@xxxxxxxxxx>, Tony Lindgren <tony@xxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Sebastian Hesselbarth <sebastian.hesselbarth@xxxxxxxxx>, Jason Cooper <jason@xxxxxxxxxxxxxx>, Stephen Warren <swarren@xxxxxxxxxxxxx>, Marc Zyngier <marc.zyngier@xxxxxxx>, Hans Ulli Kroll <ulli.kroll@xxxxxxxxxxxxxx>, Haojian Zhuang <haojian.zhuang@xxxxxxxxx>, Simon Horman <horms@xxxxxxxxxxxx>, Ben Dooks <ben-linux@xxxxxxxxx>, Gregory Clement <gregory.clement@xxxxxxxxxxxxxxxxxx>, linux-omap@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, davinci-linux-open-source@xxxxxxxxxxxxxxxxxxxx, Eric Miao <eric.y.miao@xxxxxxxxx>, Ryan Mallon <rmallon@xxxxxxxxx>, Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>, linux-crypto@xxxxxxxxxxxxxxx, Sascha Hauer <kernel@xxxxxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Christoffer Dall <christoffer.dall@xxxxxxxxxx>
- Delivery-date: Wed, 02 Jul 2014 07:59:07 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On Tue, Jul 01, 2014 at 04:58:24PM +0100, Russell King wrote:
> 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.
>
> Signed-off-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
> ---
...
> arch/arm/mach-imx/suspend-imx6.S | 5 ++--
Tested-by: Shawn Guo <shawn.guo@xxxxxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|