Re: [PATCH v3 2/4] arm64: implement ftrace with regs

2018-10-02 Thread Mark Rutland
On Tue, Oct 02, 2018 at 02:18:17PM +0200, Torsten Duwe wrote: > Hi Mark, Hi, > thank you for your very detailed feedback, I'll incorporate it > all into the next version, besides one issue: > > On Tue, Oct 02, 2018 at 12:27:41PM +0100, Mark Rutland wrote: > > > > Please use the insn framework,

Re: [PATCH v3 2/4] arm64: implement ftrace with regs

2018-10-02 Thread Torsten Duwe
Hi Mark, thank you for your very detailed feedback, I'll incorporate it all into the next version, besides one issue: On Tue, Oct 02, 2018 at 12:27:41PM +0100, Mark Rutland wrote: > > Please use the insn framework, as we do to generate all the other > instruction sequences in ftrace. > > MOV (r

Re: [PATCH v3 2/4] arm64: implement ftrace with regs

2018-10-02 Thread Mark Rutland
On Mon, Oct 01, 2018 at 04:16:48PM +0200, Torsten Duwe wrote: > Check for compiler support of -fpatchable-function-entry and use it > to intercept functions immediately on entry, saving the LR in x9. > patchable-function-entry in GCC disables IPA-RA, which means ABI > register calling conventions a

Re: [PATCH v3 2/4] arm64: implement ftrace with regs

2018-10-02 Thread Ard Biesheuvel
On 2 October 2018 at 12:02, Torsten Duwe wrote: > On Mon, Oct 01, 2018 at 05:57:52PM +0200, Ard Biesheuvel wrote: >> > --- a/arch/arm64/include/asm/ftrace.h >> > +++ b/arch/arm64/include/asm/ftrace.h >> > @@ -16,6 +16,17 @@ >> > #define MCOUNT_ADDR((unsigned long)_mcount) >> > #defin

Re: [PATCH v3 2/4] arm64: implement ftrace with regs

2018-10-02 Thread Torsten Duwe
On Mon, Oct 01, 2018 at 05:57:52PM +0200, Ard Biesheuvel wrote: > > --- a/arch/arm64/include/asm/ftrace.h > > +++ b/arch/arm64/include/asm/ftrace.h > > @@ -16,6 +16,17 @@ > > #define MCOUNT_ADDR((unsigned long)_mcount) > > #define MCOUNT_INSN_SIZE AARCH64_INSN_SIZE > > > > +/* D

Re: [PATCH v3 2/4] arm64: implement ftrace with regs

2018-10-01 Thread Ard Biesheuvel
On 1 October 2018 at 16:16, Torsten Duwe wrote: > Check for compiler support of -fpatchable-function-entry and use it > to intercept functions immediately on entry, saving the LR in x9. > patchable-function-entry in GCC disables IPA-RA, which means ABI > register calling conventions are obeyed *an

[PATCH v3 2/4] arm64: implement ftrace with regs

2018-10-01 Thread Torsten Duwe
Check for compiler support of -fpatchable-function-entry and use it to intercept functions immediately on entry, saving the LR in x9. patchable-function-entry in GCC disables IPA-RA, which means ABI register calling conventions are obeyed *and* scratch registers are available. Disable ftracing in e