On Thu, Oct 03, 2019 at 02:07:52PM -0600, Mathieu Poirier wrote:
From: Mike Leach mike.leach@linaro.org
Add the default connections group in sysfs to etm4x, etm3x, stm, tmc, funnel and replicator components.
This group will be used to collate the sysfs links representing the trace data path to and from the devices.
When booting this set on my Juno R0, probing each CTI result in a bracktrace like the following:
[ 5.708275] sysfs: cannot create duplicate filename '/devices/platform/22020000.cti/cti_cpu1/connections' [ 5.717760] CPU: 2 PID: 42 Comm: kworker/2:1 Not tainted 5.3.0-04961-gb632d2fadfdd #279 [ 5.725679] Hardware name: ARM Juno development board (r0) (DT) [ 5.731543] Workqueue: events amba_deferred_retry_func [ 5.736625] Call trace: [ 5.739044] dump_backtrace+0x0/0x150 [ 5.742664] show_stack+0x14/0x20 [ 5.745942] dump_stack+0xb0/0xf4 [ 5.749218] sysfs_warn_dup+0x5c/0x78 [ 5.752839] internal_create_group+0x394/0x3d8 [ 5.757232] sysfs_create_group+0x14/0x20 [ 5.761199] coresight_create_conns_sysfs_group+0x24/0x50 [ 5.766538] coresight_register+0x2d4/0x378 [ 5.770674] cti_probe+0x158/0x380 [ 5.774035] amba_probe+0xb0/0x158 [ 5.777399] really_probe+0xdc/0x358 [ 5.780933] driver_probe_device+0x58/0x100 [ 5.785069] __device_attach_driver+0x90/0xb0 [ 5.789377] bus_for_each_drv+0x64/0xc8 [ 5.793169] __device_attach+0xd8/0x138 [ 5.796960] device_initial_probe+0x10/0x18 [ 5.801096] bus_probe_device+0x90/0x98 [ 5.804887] device_add+0x3c4/0x620 [ 5.808335] amba_device_try_add+0x1c0/0x378 [ 5.812556] amba_deferred_retry_func+0x48/0xd0 [ 5.817036] process_one_work+0x1e0/0x350 [ 5.820999] worker_thread+0x40/0x480 [ 5.824619] kthread+0x124/0x128 [ 5.827809] ret_from_fork+0x10/0x18
I am done reviewing both your sets.
Thanks and best, Mathieu
Signed-off-by: Mike Leach mike.leach@linaro.org
drivers/hwtracing/coresight/coresight-etm3x.c | 1 + drivers/hwtracing/coresight/coresight-etm4x.c | 1 + drivers/hwtracing/coresight/coresight-funnel.c | 1 + drivers/hwtracing/coresight/coresight-replicator.c | 1 + drivers/hwtracing/coresight/coresight-stm.c | 1 + drivers/hwtracing/coresight/coresight-tmc.c | 1 + 6 files changed, 6 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index e2cb6873c3f2..aa017ed1e2fe 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -864,6 +864,7 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id) desc.pdata = pdata; desc.dev = dev; desc.groups = coresight_etm_groups;
- desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index a128b5063f46..7d94096191c3 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -1160,6 +1160,7 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) desc.pdata = pdata; desc.dev = dev; desc.groups = coresight_etmv4_groups;
- desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index 05f7896c3a01..9cdbfb75a246 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -238,6 +238,7 @@ static int funnel_probe(struct device *dev, struct resource *res) desc.ops = &funnel_cs_ops; desc.pdata = pdata; desc.dev = dev;
- desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index b29ba640eb25..eac2690c0fda 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -230,6 +230,7 @@ static int replicator_probe(struct device *dev, struct resource *res) desc.ops = &replicator_cs_ops; desc.pdata = dev->platform_data; desc.dev = dev;
- desc.add_conns_group = true;
drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c index b908ca104645..5a7c7b43d48c 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -933,6 +933,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) desc.pdata = pdata; desc.dev = dev; desc.groups = coresight_stm_groups;
- desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 1cf82fa58289..b656c1b58735 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -519,6 +519,7 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id) } adev->dev.platform_data = pdata; desc.pdata = pdata;
- desc.add_conns_group = true;
drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { -- 2.17.1
HI Mathieu,
No idea why that happened. However, the new (v2) version is restructured and I have tested against Juno (r1) and it works perfectly. Should you hit the same issue then I will revisit.
Regards
Mike
On Thu, 3 Oct 2019 at 23:10, Mathieu Poirier mathieu.poirier@linaro.org wrote:
On Thu, Oct 03, 2019 at 02:07:52PM -0600, Mathieu Poirier wrote:
From: Mike Leach mike.leach@linaro.org
Add the default connections group in sysfs to etm4x, etm3x, stm, tmc, funnel and replicator components.
This group will be used to collate the sysfs links representing the trace data path to and from the devices.
When booting this set on my Juno R0, probing each CTI result in a bracktrace like the following:
[ 5.708275] sysfs: cannot create duplicate filename '/devices/platform/22020000.cti/cti_cpu1/connections' [ 5.717760] CPU: 2 PID: 42 Comm: kworker/2:1 Not tainted 5.3.0-04961-gb632d2fadfdd #279 [ 5.725679] Hardware name: ARM Juno development board (r0) (DT) [ 5.731543] Workqueue: events amba_deferred_retry_func [ 5.736625] Call trace: [ 5.739044] dump_backtrace+0x0/0x150 [ 5.742664] show_stack+0x14/0x20 [ 5.745942] dump_stack+0xb0/0xf4 [ 5.749218] sysfs_warn_dup+0x5c/0x78 [ 5.752839] internal_create_group+0x394/0x3d8 [ 5.757232] sysfs_create_group+0x14/0x20 [ 5.761199] coresight_create_conns_sysfs_group+0x24/0x50 [ 5.766538] coresight_register+0x2d4/0x378 [ 5.770674] cti_probe+0x158/0x380 [ 5.774035] amba_probe+0xb0/0x158 [ 5.777399] really_probe+0xdc/0x358 [ 5.780933] driver_probe_device+0x58/0x100 [ 5.785069] __device_attach_driver+0x90/0xb0 [ 5.789377] bus_for_each_drv+0x64/0xc8 [ 5.793169] __device_attach+0xd8/0x138 [ 5.796960] device_initial_probe+0x10/0x18 [ 5.801096] bus_probe_device+0x90/0x98 [ 5.804887] device_add+0x3c4/0x620 [ 5.808335] amba_device_try_add+0x1c0/0x378 [ 5.812556] amba_deferred_retry_func+0x48/0xd0 [ 5.817036] process_one_work+0x1e0/0x350 [ 5.820999] worker_thread+0x40/0x480 [ 5.824619] kthread+0x124/0x128 [ 5.827809] ret_from_fork+0x10/0x18
I am done reviewing both your sets.
Thanks and best, Mathieu
Signed-off-by: Mike Leach mike.leach@linaro.org
drivers/hwtracing/coresight/coresight-etm3x.c | 1 + drivers/hwtracing/coresight/coresight-etm4x.c | 1 + drivers/hwtracing/coresight/coresight-funnel.c | 1 + drivers/hwtracing/coresight/coresight-replicator.c | 1 + drivers/hwtracing/coresight/coresight-stm.c | 1 + drivers/hwtracing/coresight/coresight-tmc.c | 1 + 6 files changed, 6 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-etm3x.c b/drivers/hwtracing/coresight/coresight-etm3x.c index e2cb6873c3f2..aa017ed1e2fe 100644 --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -864,6 +864,7 @@ static int etm_probe(struct amba_device *adev, const struct amba_id *id) desc.pdata = pdata; desc.dev = dev; desc.groups = coresight_etm_groups;
desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index a128b5063f46..7d94096191c3 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -1160,6 +1160,7 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id) desc.pdata = pdata; desc.dev = dev; desc.groups = coresight_etmv4_groups;
desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-funnel.c b/drivers/hwtracing/coresight/coresight-funnel.c index 05f7896c3a01..9cdbfb75a246 100644 --- a/drivers/hwtracing/coresight/coresight-funnel.c +++ b/drivers/hwtracing/coresight/coresight-funnel.c @@ -238,6 +238,7 @@ static int funnel_probe(struct device *dev, struct resource *res) desc.ops = &funnel_cs_ops; desc.pdata = pdata; desc.dev = dev;
desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c index b29ba640eb25..eac2690c0fda 100644 --- a/drivers/hwtracing/coresight/coresight-replicator.c +++ b/drivers/hwtracing/coresight/coresight-replicator.c @@ -230,6 +230,7 @@ static int replicator_probe(struct device *dev, struct resource *res) desc.ops = &replicator_cs_ops; desc.pdata = dev->platform_data; desc.dev = dev;
desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) {
diff --git a/drivers/hwtracing/coresight/coresight-stm.c b/drivers/hwtracing/coresight/coresight-stm.c index b908ca104645..5a7c7b43d48c 100644 --- a/drivers/hwtracing/coresight/coresight-stm.c +++ b/drivers/hwtracing/coresight/coresight-stm.c @@ -933,6 +933,7 @@ static int stm_probe(struct amba_device *adev, const struct amba_id *id) desc.pdata = pdata; desc.dev = dev; desc.groups = coresight_stm_groups;
desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) { ret = PTR_ERR(drvdata->csdev);
diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 1cf82fa58289..b656c1b58735 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -519,6 +519,7 @@ static int tmc_probe(struct amba_device *adev, const struct amba_id *id) } adev->dev.platform_data = pdata; desc.pdata = pdata;
desc.add_conns_group = true; drvdata->csdev = coresight_register(&desc); if (IS_ERR(drvdata->csdev)) {
-- 2.17.1