From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Mao Jinlong <quic_jinlmao@quicinc.com>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mao Jinlong <jinlmao@qti.qualcomm.com>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Tingwei Zhang <quic_tingweiz@quicinc.com>,
Yuanfang Zhang <quic_yuanfang@quicinc.com>,
Tao Zhang <quic_taozha@quicinc.com>,
Hao Zhang <quic_hazha@quicinc.com>
Subject: Re: [PATCH] coresight: Defer probe when the child dev is not probed
Date: Mon, 28 Feb 2022 14:51:24 +0000 [thread overview]
Message-ID: <861dd6e1-30dc-626e-3449-72d3b6822e7b@arm.com> (raw)
In-Reply-To: <20220228133112.3987-1-quic_jinlmao@quicinc.com>
Hi Jinlong
On 28/02/2022 13:31, Mao Jinlong wrote:
> From: Mao Jinlong <jinlmao@qti.qualcomm.com>
>
> It is possible that when device probe, its child device is not
> probed. Then it will fail when add sysfs connection for the device.
> Make device defer probe when the child device is not probed.
Please could you a bit a more specific on the exact issue ?
I don't see a problem with probe deferral right now, with
coresight/next.
For e.g.,
root@juno-server:~# lsmod
Module Size Used by
coresight 73728 0
root@juno-server:~# ls /sys/bus/coresight/devices/
root@juno-server:~# modprobe coresight-etm4x
root@juno-server:~# lsmod
Module Size Used by
coresight_etm4x 81920 0
coresight 73728 1 coresight_etm4x
root@juno-server:~# ls /sys/bus/coresight/devices/
etm0 etm1
-- Note etm2-etm5 doesn't appear --
root@juno-server:~# modprobe coresight-funnel
root@juno-server:~# lsmod
Module Size Used by
coresight_funnel 20480 0
coresight_etm4x 81920 0
coresight 73728 2 coresight_etm4x,coresight_funnel
root@juno-server:~# ls /sys/bus/coresight/devices/
etm0 etm1
-- Still don't appear ---
root@juno-server:~# modprobe coresight-replicator
root@juno-server:~# ls /sys/bus/coresight/devices/
etm0 etm1
root@juno-server:~# modprobe coresight-tmc
-- At this stage, the devices automatically get probed and appear --
root@juno-server:~# ls /sys/bus/coresight/devices/
etm0 etm1 etm2 etm3 etm4 etm5 funnel0 funnel1 funnel2 tmc_etf0
tmc_etr0
root@juno-server:~# lsmod
Module Size Used by
coresight_tmc 40960 0
coresight_replicator 20480 0
coresight_funnel 20480 0
coresight_etm4x 81920 0
coresight 73728 4
coresight_tmc,coresight_etm4x,coresight_replicator,coresight_funnel
So, my question is, what is this patch trying to solve ?
Cheers
Suzuki
>
> Signed-off-by: Mao Jinlong <jinlmao@qti.qualcomm.com>
> ---
> drivers/hwtracing/coresight/coresight-sysfs.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-sysfs.c b/drivers/hwtracing/coresight/coresight-sysfs.c
> index 34d2a2d31d00..7df9eb59bf2c 100644
> --- a/drivers/hwtracing/coresight/coresight-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-sysfs.c
> @@ -73,8 +73,10 @@ int coresight_add_sysfs_link(struct coresight_sysfs_link *info)
> if (!info->orig || !info->target ||
> !info->orig_name || !info->target_name)
> return -EINVAL;
> - if (!info->orig->has_conns_grp || !info->target->has_conns_grp)
> + if (!info->orig->has_conns_grp)
> return -EINVAL;
> + if (!info->target->has_conns_grp)
> + return -EPROBE_DEFER;
>
> /* first link orig->target */
> ret = sysfs_add_link_to_group(&info->orig->dev.kobj,
next prev parent reply other threads:[~2022-02-28 14:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-28 13:31 Mao Jinlong
2022-02-28 14:51 ` Suzuki K Poulose [this message]
[not found] ` <a63abe13-793e-323f-e214-1dd9826c8a9a@quicinc.com>
2022-03-01 13:15 ` Mike Leach
2022-03-01 13:30 ` Jinlong Mao
2022-03-01 15:03 ` Suzuki K Poulose
2022-03-02 2:29 ` Jinlong Mao
2022-03-02 8:05 ` Jinlong Mao
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=861dd6e1-30dc-626e-3449-72d3b6822e7b@arm.com \
--to=suzuki.poulose@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=jinlmao@qti.qualcomm.com \
--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_yuanfang@quicinc.com \
/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®