From: Steven Rostedt (VMware) Date: Fri, 3 Jan 2020 03:02:41 +0000 (-0500) Subject: tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined X-Git-Tag: v5.15~4791^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b8299d362d0837ae39e87e9019ebe6b736e0f035;p=platform%2Fkernel%2Flinux-starfive.git tracing: Have stack tracer compile when MCOUNT_INSN_SIZE is not defined On some archs with some configurations, MCOUNT_INSN_SIZE is not defined, and this makes the stack tracer fail to compile. Just define it to zero in this case. Link: https://lore.kernel.org/r/202001020219.zvE3vsty%lkp@intel.com Cc: stable@vger.kernel.org Fixes: 4df297129f622 ("tracing: Remove most or all of stack tracer stack size from stack_max_size") Reported-by: kbuild test robot Signed-off-by: Steven Rostedt (VMware) --- diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c index 4df9a20..c557f42 100644 --- a/kernel/trace/trace_stack.c +++ b/kernel/trace/trace_stack.c @@ -283,6 +283,11 @@ static void check_stack(unsigned long ip, unsigned long *stack) local_irq_restore(flags); } +/* Some archs may not define MCOUNT_INSN_SIZE */ +#ifndef MCOUNT_INSN_SIZE +# define MCOUNT_INSN_SIZE 0 +#endif + static void stack_trace_call(unsigned long ip, unsigned long parent_ip, struct ftrace_ops *op, struct pt_regs *pt_regs)