mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Tao Zhang <quic_taozha@quicinc.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Konrad Dybcio <konradybcio@gmail.com>,
	Mike Leach <mike.leach@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
Cc: Jinlong Mao <quic_jinlmao@quicinc.com>,
	Leo Yan <leo.yan@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Tingwei Zhang <quic_tingweiz@quicinc.com>,
	Yuanfang Zhang <quic_yuanfang@quicinc.com>,
	Trilok Soni <quic_tsoni@quicinc.com>,
	Hao Zhang <quic_hazha@quicinc.com>,
	linux-arm-msm@vger.kernel.org, andersson@kernel.org
Subject: Re: [PATCH] coresight: cti: Check if the CPU activated for the CPU CTI
Date: Mon, 27 Mar 2023 10:52:03 +0100	[thread overview]
Message-ID: <9c7f6414-ac5c-bee2-7068-04a7ee7d94f9@arm.com> (raw)
In-Reply-To: <1679910560-23469-1-git-send-email-quic_taozha@quicinc.com>

On 27/03/2023 10:49, Tao Zhang wrote:
> Check whether the CPU corresponding to the CPU CTI is activated.
> If it is not activated, the CPU CTI node should not exist, and
> an error will be returned in the initialization function.
> 
> Signed-off-by: Tao Zhang <quic_taozha@quicinc.com>
> ---
>   drivers/hwtracing/coresight/coresight-cti-core.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c b/drivers/hwtracing/coresight/coresight-cti-core.c
> index 277c890..aaa83ae 100644
> --- a/drivers/hwtracing/coresight/coresight-cti-core.c
> +++ b/drivers/hwtracing/coresight/coresight-cti-core.c
> @@ -899,10 +899,12 @@ static int cti_probe(struct amba_device *adev, const struct amba_id *id)
>   	drvdata->config.hw_powered = true;
>   
>   	/* set up device name - will depend if cpu bound or otherwise */
> -	if (drvdata->ctidev.cpu >= 0)
> +	if (drvdata->ctidev.cpu >= 0) {
> +		if (!cpu_active(drvdata->ctidev.cpu))
> +			return -ENXIO;
>   		cti_desc.name = devm_kasprintf(dev, GFP_KERNEL, "cti_cpu%d",
>   					       drvdata->ctidev.cpu);

But why ? As long as we do not enable or touch any CPU specific bits in 
the probe, why do we need to fail this ? What are you trying to fix ?

Please could you share the log if you are hitting something ? This looks
like masking a problem.

Suzuki


> -	else
> +	} else
>   		cti_desc.name = coresight_alloc_device_name(&cti_sys_devs, dev);
>   	if (!cti_desc.name)
>   		return -ENOMEM;


  reply	other threads:[~2023-03-27  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  9:49 Tao Zhang
2023-03-27  9:52 ` Suzuki K Poulose [this message]
     [not found]   ` <81a39cd8-745d-334d-840d-66aed47c3470@quicinc.com>
2023-03-27 14:57     ` Suzuki K Poulose

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=9c7f6414-ac5c-bee2-7068-04a7ee7d94f9@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=andersson@kernel.org \
    --cc=coresight@lists.linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konradybcio@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@linaro.org \
    --cc=quic_hazha@quicinc.com \
    --cc=quic_jinlmao@quicinc.com \
    --cc=quic_taozha@quicinc.com \
    --cc=quic_tingweiz@quicinc.com \
    --cc=quic_tsoni@quicinc.com \
    --cc=quic_yuanfang@quicinc.com \
    --cc=robh+dt@kernel.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

all inboxes | Powered by JetHome®