Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-08-01 Thread yalin wang
> 在 2015年7月31日,18:14,Will Deacon 写道: > > On Fri, Jul 31, 2015 at 10:33:55AM +0100, Peter Zijlstra wrote: >> On Fri, Jul 31, 2015 at 05:25:02PM +0800, yalin wang wrote: On Jul 31, 2015, at 15:52, Peter Zijlstra wrote: On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: >

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-08-01 Thread yalin wang
在 2015年7月31日,18:14,Will Deacon will.dea...@arm.com 写道: On Fri, Jul 31, 2015 at 10:33:55AM +0100, Peter Zijlstra wrote: On Fri, Jul 31, 2015 at 05:25:02PM +0800, yalin wang wrote: On Jul 31, 2015, at 15:52, Peter Zijlstra pet...@infradead.org wrote: On Fri, Jul 31, 2015 at 03:41:37PM +0800,

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread Will Deacon
On Fri, Jul 31, 2015 at 10:33:55AM +0100, Peter Zijlstra wrote: > On Fri, Jul 31, 2015 at 05:25:02PM +0800, yalin wang wrote: > > > On Jul 31, 2015, at 15:52, Peter Zijlstra wrote: > > > On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: > > >> This change a little arch_static_branch(),

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread Peter Zijlstra
On Fri, Jul 31, 2015 at 05:25:02PM +0800, yalin wang wrote: > > > On Jul 31, 2015, at 15:52, Peter Zijlstra wrote: > > > > On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: > >> This change a little arch_static_branch(), use b . + 4 for false > >> return, why? According to aarch64

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread yalin wang
> On Jul 31, 2015, at 15:52, Peter Zijlstra wrote: > > On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: >> This change a little arch_static_branch(), use b . + 4 for false >> return, why? According to aarch64 TRM, if both source and dest >> instr are branch instr, can patch the instr

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread Peter Zijlstra
On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: > This change a little arch_static_branch(), use b . + 4 for false > return, why? According to aarch64 TRM, if both source and dest > instr are branch instr, can patch the instr directly, don't need > all cpu to do ISB for sync, this

[RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread yalin wang
This change a little arch_static_branch(), use b . + 4 for false return, why? According to aarch64 TRM, if both source and dest instr are branch instr, can patch the instr directly, don't need all cpu to do ISB for sync, this means we can call aarch64_insn_patch_text_nosync() during patch_text(),

[RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread yalin wang
This change a little arch_static_branch(), use b . + 4 for false return, why? According to aarch64 TRM, if both source and dest instr are branch instr, can patch the instr directly, don't need all cpu to do ISB for sync, this means we can call aarch64_insn_patch_text_nosync() during patch_text(),

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread Peter Zijlstra
On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: This change a little arch_static_branch(), use b . + 4 for false return, why? According to aarch64 TRM, if both source and dest instr are branch instr, can patch the instr directly, don't need all cpu to do ISB for sync, this means we

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread yalin wang
On Jul 31, 2015, at 15:52, Peter Zijlstra pet...@infradead.org wrote: On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: This change a little arch_static_branch(), use b . + 4 for false return, why? According to aarch64 TRM, if both source and dest instr are branch instr, can

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread Peter Zijlstra
On Fri, Jul 31, 2015 at 05:25:02PM +0800, yalin wang wrote: On Jul 31, 2015, at 15:52, Peter Zijlstra pet...@infradead.org wrote: On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: This change a little arch_static_branch(), use b . + 4 for false return, why? According to

Re: [RFC] arm64:change jump_label to use branch instruction, not use NOP instr

2015-07-31 Thread Will Deacon
On Fri, Jul 31, 2015 at 10:33:55AM +0100, Peter Zijlstra wrote: On Fri, Jul 31, 2015 at 05:25:02PM +0800, yalin wang wrote: On Jul 31, 2015, at 15:52, Peter Zijlstra pet...@infradead.org wrote: On Fri, Jul 31, 2015 at 03:41:37PM +0800, yalin wang wrote: This change a little