Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-17 Thread Naveen N. Rao
Nicholas Piggin wrote: Naveen N. Rao's on May 17, 2019 4:22 am: While enabling ftrace, we will first need to patch the preceding 'mflr r0' (which would now be a 'nop') with 'b +8', then use synchronize_rcu_tasks() and finally patch in 'bl _mcount()' followed by 'mflr r0'. I think that's wha

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-17 Thread Nicholas Piggin
Naveen N. Rao's on May 17, 2019 4:22 am: > Nicholas Piggin wrote: >> Naveen N. Rao's on May 14, 2019 6:32 pm: >>> Michael Ellerman wrote: "Naveen N. Rao" writes: > Michael Ellerman wrote: >> Nicholas Piggin writes: >>> The new mprofile-kernel mcount sequence is >>> >>>

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-16 Thread Naveen N. Rao
Nicholas Piggin wrote: Naveen N. Rao's on May 14, 2019 6:32 pm: Michael Ellerman wrote: "Naveen N. Rao" writes: Michael Ellerman wrote: Nicholas Piggin writes: The new mprofile-kernel mcount sequence is mflr r0 bl_mcount Dynamic ftrace patches the branch instruction with a noop,

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-15 Thread Nicholas Piggin
Naveen N. Rao's on May 14, 2019 6:32 pm: > Michael Ellerman wrote: >> "Naveen N. Rao" writes: >>> Michael Ellerman wrote: Nicholas Piggin writes: > The new mprofile-kernel mcount sequence is > > mflrr0 > bl _mcount > > Dynamic ftrace patches the branch in

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-15 Thread Michael Ellerman
"Naveen N. Rao" writes: > Michael Ellerman wrote: >> "Naveen N. Rao" writes: >>> Michael Ellerman wrote: Nicholas Piggin writes: > The new mprofile-kernel mcount sequence is > > mflrr0 > bl _mcount > > Dynamic ftrace patches the branch instruction with a

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-14 Thread Naveen N. Rao
Michael Ellerman wrote: "Naveen N. Rao" writes: Michael Ellerman wrote: Nicholas Piggin writes: The new mprofile-kernel mcount sequence is mflr r0 bl_mcount Dynamic ftrace patches the branch instruction with a noop, but leaves the mflr. mflr is executed by the branch unit that can

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-13 Thread Michael Ellerman
"Naveen N. Rao" writes: > Michael Ellerman wrote: >> Nicholas Piggin writes: >>> The new mprofile-kernel mcount sequence is >>> >>> mflr r0 >>> bl_mcount >>> >>> Dynamic ftrace patches the branch instruction with a noop, but leaves >>> the mflr. mflr is executed by the branch uni

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-12 Thread Naveen N. Rao
Michael Ellerman wrote: Nicholas Piggin writes: The new mprofile-kernel mcount sequence is mflr r0 bl_mcount Dynamic ftrace patches the branch instruction with a noop, but leaves the mflr. mflr is executed by the branch unit that can only execute one per cycle on POWER9 and shared wi

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-05-12 Thread Michael Ellerman
Nicholas Piggin writes: > The new mprofile-kernel mcount sequence is > > mflrr0 > bl _mcount > > Dynamic ftrace patches the branch instruction with a noop, but leaves > the mflr. mflr is executed by the branch unit that can only execute one > per cycle on POWER9 and shared with branch

Re: [RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-04-15 Thread Naveen N. Rao
Hi Nick, Nicholas Piggin wrote: The new mprofile-kernel mcount sequence is mflr r0 bl_mcount Dynamic ftrace patches the branch instruction with a noop, but leaves the mflr. mflr is executed by the branch unit that can only execute one per cycle on POWER9 and shared with branches, so i

[RFC PATCH] powerpc/64/ftrace: mprofile-kernel patch out mflr

2019-04-12 Thread Nicholas Piggin
The new mprofile-kernel mcount sequence is mflr r0 bl_mcount Dynamic ftrace patches the branch instruction with a noop, but leaves the mflr. mflr is executed by the branch unit that can only execute one per cycle on POWER9 and shared with branches, so it would be nice to avoid it where p