On Mon, 15 May 2017 23:35:03 +0530 "Naveen N. Rao" <naveen.n....@linux.vnet.ibm.com> wrote: > diff --git a/arch/powerpc/include/asm/kprobes.h > b/arch/powerpc/include/asm/kprobes.h > index a83821f33ea3..b6960ef213ac 100644 > --- a/arch/powerpc/include/asm/kprobes.h > +++ b/arch/powerpc/include/asm/kprobes.h > @@ -61,6 +61,15 @@ extern kprobe_opcode_t optprobe_template_end[]; > #define MAX_OPTINSN_SIZE (optprobe_template_end - > optprobe_template_entry) > #define RELATIVEJUMP_SIZE sizeof(kprobe_opcode_t) /* 4 bytes */ > > +/* Save upto 16 parameters along with the stack frame header */ > +#define MAX_STACK_SIZE (STACK_FRAME_PARM_SAVE + (16 * > sizeof(unsigned long))) > +#define MIN_STACK_SIZE(ADDR) \ > + (((MAX_STACK_SIZE) < (((unsigned long)current_thread_info()) + \ > + THREAD_SIZE - (unsigned long)(ADDR))) \ > + ? (MAX_STACK_SIZE) \ > + : (((unsigned long)current_thread_info()) + \ > + THREAD_SIZE - (unsigned long)(ADDR)))
Could you add CUR_STACK_SIZE(addr) as x86 does instead of repeating similar code? Thank you, -- Masami Hiramatsu <mhira...@kernel.org>