public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo A. R. Silva" <gustavoars@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: kernel test robot <lkp@intel.com>,
	llvm@lists.linux.dev, kbuild-all@lists.01.org,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [gustavoars:for-next/cast-function 1/3] kernel/trace/ftrace.c:7029:6: error: no previous prototype for function 'arch_ftrace_ops_list_func'
Date: Thu, 14 Oct 2021 13:14:56 -0500	[thread overview]
Message-ID: <20211014181456.GA1146469@embeddedor> (raw)
In-Reply-To: <20211014135317.0755987f@gandalf.local.home>

On Thu, Oct 14, 2021 at 01:53:17PM -0400, Steven Rostedt wrote:
> This should fix this issue as well as some of the other ones reported on
> this commit.
> 
> [ I'll be adding this update to my own version in my tree ]

Great. I'll apply it to my tree. Thanks! :)

--
Gustavo

> 
> -- Steve
> 
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index b86f52683b6f..8771c435f34b 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -178,7 +178,8 @@
>  			ftrace_ops_list_func = arch_ftrace_ops_list_func;
>  #else
>  # ifdef CONFIG_FUNCTION_TRACER
> -#  define MCOUNT_REC()	ftrace_stub_graph = ftrace_stub;
> +#  define MCOUNT_REC()	ftrace_stub_graph = ftrace_stub;	\
> +			ftrace_ops_list_func = arch_ftrace_ops_list_func;
>  # else
>  #  define MCOUNT_REC()
>  # endif
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 832e65f06754..871b51bec170 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -30,16 +30,25 @@
>  #define ARCH_SUPPORTS_FTRACE_OPS 0
>  #endif
>  
> +#ifdef CONFIG_FUNCTION_TRACER
> +struct ftrace_ops;
>  /*
>   * If the arch's mcount caller does not support all of ftrace's
>   * features, then it must call an indirect function that
>   * does. Or at least does enough to prevent any unwelcome side effects.
> + *
> + * Also define the function prototype that these architectures use
> + * to call the ftrace_ops_list_func().
>   */
>  #if !ARCH_SUPPORTS_FTRACE_OPS
>  # define FTRACE_FORCE_LIST_FUNC 1
> +void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip);
>  #else
>  # define FTRACE_FORCE_LIST_FUNC 0
> +void arch_ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
> +			       struct ftrace_ops *op, struct ftrace_regs *fregs);
>  #endif
> +#endif /* CONFIG_FUNCTION_TRACER */
>  
>  /* Main tracing buffer and events set up */
>  #ifdef CONFIG_TRACING
> @@ -88,8 +97,6 @@ extern int
>  ftrace_enable_sysctl(struct ctl_table *table, int write,
>  		     void *buffer, size_t *lenp, loff_t *ppos);
>  
> -struct ftrace_ops;
> -
>  #ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS
>  
>  struct ftrace_regs {

      reply	other threads:[~2021-10-14 18:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-13 23:33 [gustavoars:for-next/cast-function 1/3] kernel/trace/ftrace.c:7029:6: error: no previous prototype for function 'arch_ftrace_ops_list_func' kernel test robot
2021-10-14 17:53 ` Steven Rostedt
2021-10-14 18:14   ` Gustavo A. R. Silva [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211014181456.GA1146469@embeddedor \
    --to=gustavoars@kernel.org \
    --cc=gustavo@embeddedor.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox