diff mbox series

[v1] trace: add the necessary dependencies of configuration options

Message ID 20230414082756.24119-1-sunying@nj.iscas.ac.cn (mailing list archive)
State Rejected
Headers show
Series [v1] trace: add the necessary dependencies of configuration options | expand

Commit Message

sunying@nj.iscas.ac.cn April 14, 2023, 8:27 a.m. UTC
From: Ying Sun <sunying@nj.iscas.ac.cn>

HAVE_NOP_MCOUNT is used only if the condition
"ifdef CONFIG_FTRACE_MCOUNT_USE_CC" is met in the Makefile,
adding a dependency constraint on this configuration option
 to prevent it from being set ‘y' but not taking effect.

Suggested-by: Yanjie Ren <renyanjie01@gmail.com>
Signed-off-by: Ying Sun <sunying@nj.iscas.ac.cn>
---
 kernel/trace/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Steven Rostedt April 25, 2023, 7:02 p.m. UTC | #1
On Fri, 14 Apr 2023 16:27:56 +0800
sunying@nj.iscas.ac.cn wrote:

> From: Ying Sun <sunying@nj.iscas.ac.cn>
> 
> HAVE_NOP_MCOUNT is used only if the condition
> "ifdef CONFIG_FTRACE_MCOUNT_USE_CC" is met in the Makefile,
> adding a dependency constraint on this configuration option
>  to prevent it from being set ‘y' but not taking effect.
> 
> Suggested-by: Yanjie Ren <renyanjie01@gmail.com>
> Signed-off-by: Ying Sun <sunying@nj.iscas.ac.cn>
> ---
>  kernel/trace/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
> index 8cf97fa4a4b3..c640f405cc91 100644
> --- a/kernel/trace/Kconfig
> +++ b/kernel/trace/Kconfig
> @@ -77,6 +77,7 @@ config HAVE_FENTRY
>  
>  config HAVE_NOP_MCOUNT
>  	bool
> +	depends on FTRACE_MCOUNT_USE_CC

As I replied to the other email. The HAVE_* configs are only for
architectures to say if they support something or not. There's no need to
add dependencies here.

-- Steve



>  	help
>  	  Arch supports the gcc options -pg with -mrecord-mcount and -nop-mcount
>
diff mbox series

Patch

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 8cf97fa4a4b3..c640f405cc91 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -77,6 +77,7 @@  config HAVE_FENTRY
 
 config HAVE_NOP_MCOUNT
 	bool
+	depends on FTRACE_MCOUNT_USE_CC
 	help
 	  Arch supports the gcc options -pg with -mrecord-mcount and -nop-mcount