[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: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
- Date: Fri, 4 Jul 2014 12:27:10 +0100
- 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>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, 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, Shawn Guo <shawn.guo@xxxxxxxxxxxxx>, 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: Fri, 04 Jul 2014 11:27:56 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
On Tue, 1 Jul 2014, 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>
For the Xen changes:
Acked-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|