[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210415004325.GA955389@leoy-ThinkPad-X240s>
Date: Thu, 15 Apr 2021 08:43:25 +0800
From: Leo Yan <leo.yan@...aro.org>
To: Mike Leach <mike.leach@...aro.org>
Cc: linux-arm-kernel@...ts.infradead.org, coresight@...ts.linaro.org,
mathieu.poirier@...aro.org, suzuki.poulose@....com,
alexander.shishkin@...ux.intel.com, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] coresight: etm-perf: Fix define build issue when built
as module
On Wed, Apr 14, 2021 at 08:48:08PM +0100, Mike Leach wrote:
> CONFIG_CORESIGHT_SOURCE_ETM4X is undefined when built as module,
> CONFIG_CORESIGHT_SOURCE_ETM4X_MODULE is defined instead.
>
> Therefore code in format_attr_contextid_show() not correctly complied
> when coresight built as module.
>
> Use IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) to correct this.
>
> Fixes: 88f11864cf1d ("coresight: etm-perf: Support PID tracing for kernel at EL2")
> Signed-off-by: Mike Leach <mike.leach@...aro.org>
Reviewed-by: Leo Yan <leo.yan@...aro.org>
And sorry for introducing mistakes when sending the patches.
> ---
> drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
> index 560baefdfed8..b2d6db78a025 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -78,7 +78,7 @@ static ssize_t format_attr_contextid_show(struct device *dev,
> {
> int pid_fmt = ETM_OPT_CTXTID;
>
> -#if defined(CONFIG_CORESIGHT_SOURCE_ETM4X)
> +#if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X)
> pid_fmt = is_kernel_in_hyp_mode() ? ETM_OPT_CTXTID2 : ETM_OPT_CTXTID;
> #endif
> return sprintf(page, "config:%d\n", pid_fmt);
> --
> 2.17.1
>
Powered by blists - more mailing lists