Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-07 Thread Tomasz Figa
Hi Russell, On 01.07.2014 18:19, 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 strong

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-07 Thread Robert Jarzmik
Russell King writes: > 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 th

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-07 Thread Shawn Guo
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 i

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-07 Thread Gregory CLEMENT
Hi Russell, On 01/07/2014 17:58, 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 strong

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-07 Thread Christoffer Dall
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 i

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-07 Thread Nicolas Pitre
On Tue, 1 Jul 2014, Will Deacon wrote: > Hi Mans, > > On Tue, Jul 01, 2014 at 06:24:43PM +0100, Måns Rullgård wrote: > > Russell King - ARM Linux writes: > > > As you point out, "bx lr" /may/ be treated specially (I've actually been > > > > Most, if not all, Cortex-A cores do this according the

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-07 Thread Stefano Stabellini
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

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-07 Thread Andrew Lunn
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 i

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-04 Thread Uwe Kleine-König
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 i

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-04 Thread Haojian Zhuang
On Tue, Jul 1, 2014 at 11:58 PM, 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 strong

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-02 Thread Sekhar Nori
On Tuesday 01 July 2014 09:28 PM, 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 strong

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+

2014-07-02 Thread Tony Lindgren
* Russell King [140701 09:01]: > 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 u

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Måns Rullgård
Will Deacon writes: > Hi Mans, > > On Tue, Jul 01, 2014 at 06:24:43PM +0100, Måns Rullgård wrote: >> Russell King - ARM Linux writes: >> > As you point out, "bx lr" /may/ be treated specially (I've actually been >> >> Most, if not all, Cortex-A cores do this according the public TRMs. >> They a

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Stephen Warren
On 07/01/2014 10:19 AM, 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 recomme

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Will Deacon
Hi Mans, On Tue, Jul 01, 2014 at 06:24:43PM +0100, Måns Rullgård wrote: > Russell King - ARM Linux writes: > > As you point out, "bx lr" /may/ be treated specially (I've actually been > > Most, if not all, Cortex-A cores do this according the public TRMs. > They also do the same thing for "mov p

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Måns Rullgård
Russell King - ARM Linux writes: > On Tue, Jul 01, 2014 at 05:42:42PM +0100, Måns Rullgård wrote: >> Russell King writes: >> >> > 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" instruc

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Russell King - ARM Linux
On Tue, Jul 01, 2014 at 05:42:42PM +0100, Måns Rullgård wrote: > Russell King writes: > > > 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"

Re: [PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part1)

2014-07-01 Thread Måns Rullgård
Russell King writes: > 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 th

[PATCH] ARM: convert all "mov.* pc, reg" to "bx reg" for ARMv6+ (part2)

2014-07-01 Thread Russell King
--- a/arch/arm/mm/proc-arm926.S +++ b/arch/arm/mm/proc-arm926.S @@ -55,7 +55,7 @@ * cpu_arm926_proc_init() */ ENTRY(cpu_arm926_proc_init) - mov pc, lr + ret lr /* * cpu_arm926_proc_fin() @@ -65,7 +65,7 @@ ENTRY(cpu_arm926_proc_fin) bic r0, r0, #0x1000