Re: [PATCH 04/12] powerpc/ftrace: Prepare for -mprofile-kernel

2016-02-26 Thread Michael Ellerman
On Thu, 2016-02-25 at 14:52 +0100, Torsten Duwe wrote: > On Thu, Feb 25, 2016 at 01:28:27AM +1100, Michael Ellerman wrote: > > @@ -450,17 +448,44 @@ static unsigned long stub_for_addr(const Elf64_Shdr > > *sechdrs, > > return (unsigned long)[i]; > > } > > > > +#ifdef

Re: [PATCH 04/12] powerpc/ftrace: Prepare for -mprofile-kernel

2016-02-25 Thread Torsten Duwe
On Thu, Feb 25, 2016 at 01:28:27AM +1100, Michael Ellerman wrote: > @@ -450,17 +448,44 @@ static unsigned long stub_for_addr(const Elf64_Shdr > *sechdrs, > return (unsigned long)[i]; > } > > +#ifdef CC_USING_MPROFILE_KERNEL > +static int is_early_mcount_callsite(u32 *instruction) > +{ >

Re: [PATCH 04/12] powerpc/ftrace: Prepare for -mprofile-kernel

2016-02-25 Thread Michael Ellerman
On Thu, 2016-02-25 at 11:28 +1100, Balbir Singh wrote: > On 25/02/16 01:28, Michael Ellerman wrote: > > @@ -300,8 +298,34 @@ __ftrace_make_call(struct dyn_ftrace *rec, unsigned > > long addr) > > * The load offset is different depending on the ABI. For simplicity > > * just mask it out

Re: [PATCH 04/12] powerpc/ftrace: Prepare for -mprofile-kernel

2016-02-24 Thread Balbir Singh
On 25/02/16 01:28, Michael Ellerman wrote: > From: Torsten Duwe > > The gcc switch -mprofile-kernel, available for ppc64 on gcc > 4.8.5, > allows to call _mcount very early in the function, which low-level > ASM code and code patching functions need to consider. > Especially the

[PATCH 04/12] powerpc/ftrace: Prepare for -mprofile-kernel

2016-02-24 Thread Michael Ellerman
From: Torsten Duwe The gcc switch -mprofile-kernel, available for ppc64 on gcc > 4.8.5, allows to call _mcount very early in the function, which low-level ASM code and code patching functions need to consider. Especially the link register and the parameter registers are still alive