Hi,
> -----Original Message-----
> From: Amir Ayupov <aaupov(a)fb.com>
> Sent: Tuesday, October 13, 2026 12:05 AM
> To: James Clark <james.clark(a)linaro.org>; Leo Yan <Leo.Yan(a)arm.com>;
> Suzuki Poulose <Suzuki.Poulose(a)arm.com>; Mike Leach
> <Mike.Leach(a)arm.com>; Alexander Shishkin
> <alexander.shishkin(a)linux.intel.com>
> Cc: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>; Jonathan Corbet
> <corbet(a)lwn.net>; Mathieu Poirier <mathieu.poirier(a)linaro.org>; Randy
> Dunlap <rdunlap(a)infradead.org>; Shuah Khan <skhan(a)linuxfoundation.org>;
> coresight(a)lists.linaro.org; linux-arm-kernel(a)lists.infradead.org; linux-
> doc(a)vger.kernel.org; linux-kernel(a)vger.kernel.org
> Subject: [PATCH v2 1/4] coresight: syscfg: Fail to enable a configuration not
> loaded on the device
>
> cscfg_csdev_enable_active_config() looks up the selected configuration in
> the device's loaded configurations, and returns success when it is not
> there. A configuration is only loaded on devices that match at least one
> of its features, so a perf session or sysfs enable that selects it on any
> other device runs without the configuration, with no error.
>
> Return -EINVAL instead, so enabling the source fails on that device. The
> function is only called with a non-zero configuration hash, so sources
> enabled without a configuration are unaffected.
>
If you look at the original comments - the idea of this function is to enable a configuration on a device if it is present on that device.
Not enabling a configuration is _not_ an error. This is a generic function that can cover multiple classes of coresight device.
Moving forwards matching configurations to devices can omit certain devices from the configuration.
For example, a system will have many CTIs, but we may only want to use a specific one or two - possibly to connect etm external outputs to trigger a PE interrupt.
Thus the remaining CTIs would not be active in this configuration.
This conflicts with your purpose which I assume is to prevent perf from using ETM sources that cannot load the required configuration.
I think what is actually needed is a "can_activate" function to be run on the ETM/ETE sources at etm_setup_aux time so that none compliant devices can be filtered out of the active cpu mask at that point.
Regards
Mike
> Fixes: f8cce2ff3c04 ("coresight: syscfg: Add API to activate and enable
> configurations")
> Assisted-by: Devmate:Opus-5.5
> Signed-off-by: Amir Ayupov <aaupov(a)fb.com>
> ---
> .../hwtracing/coresight/coresight-syscfg.c | 53 ++++++++++---------
> 1 file changed, 28 insertions(+), 25 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-syscfg.c
> b/drivers/hwtracing/coresight/coresight-syscfg.c
> index 2bfdd7b45e49c..a816c22c87bc8 100644
> --- a/drivers/hwtracing/coresight/coresight-syscfg.c
> +++ b/drivers/hwtracing/coresight/coresight-syscfg.c
> @@ -1088,36 +1088,39 @@ int cscfg_csdev_enable_active_config(struct
> coresight_device *csdev,
> raw_spin_unlock_irqrestore(&csdev->cscfg_csdev_lock, flags);
>
> /*
> - * If found, attempt to enable
> + * The configuration is active but not loaded on this device, because
> + * none of its features match the device. Fail rather than trace
> + * without it.
> */
> - if (config_csdev_active) {
> + if (!config_csdev_active)
> + return -EINVAL;
> +
> + /*
> + * Call the generic routine that will program up the internal
> + * driver structures prior to programming up the hardware.
> + * This routine takes the driver spinlock saved in the configs.
> + */
> + err = cscfg_csdev_enable_config(config_csdev_active, preset);
> + if (!err) {
> /*
> - * Call the generic routine that will program up the internal
> - * driver structures prior to programming up the hardware.
> - * This routine takes the driver spinlock saved in the configs.
> + * Successful programming. Check the active_cscfg_ctxt
> + * pointer to ensure no pre-emption disabled it via
> + * cscfg_csdev_disable_active_config() before
> + * we could start.
> + *
> + * Set enabled if OK, err if not.
> */
> - err = cscfg_csdev_enable_config(config_csdev_active, preset);
> - if (!err) {
> - /*
> - * Successful programming. Check the
> active_cscfg_ctxt
> - * pointer to ensure no pre-emption disabled it via
> - * cscfg_csdev_disable_active_config() before
> - * we could start.
> - *
> - * Set enabled if OK, err if not.
> - */
> - raw_spin_lock_irqsave(&csdev->cscfg_csdev_lock,
> flags);
> - if (csdev->active_cscfg_ctxt)
> - config_csdev_active->enabled = true;
> - else
> - err = -EBUSY;
> - raw_spin_unlock_irqrestore(&csdev-
> >cscfg_csdev_lock, flags);
> - }
> -
> - if (err)
> - cscfg_config_desc_put(config_desc);
> + raw_spin_lock_irqsave(&csdev->cscfg_csdev_lock, flags);
> + if (csdev->active_cscfg_ctxt)
> + config_csdev_active->enabled = true;
> + else
> + err = -EBUSY;
> + raw_spin_unlock_irqrestore(&csdev->cscfg_csdev_lock, flags);
> }
>
> + if (err)
> + cscfg_config_desc_put(config_desc);
> +
> return err;
> }
> EXPORT_SYMBOL_GPL(cscfg_csdev_enable_active_config);
> --
> 2.52.0
Hi,
> -----Original Message-----
> From: Amir Ayupov <aaupov(a)fb.com>
> Sent: Tuesday, October 13, 2026 12:05 AM
> To: James Clark <james.clark(a)linaro.org>; Leo Yan <Leo.Yan(a)arm.com>;
> Suzuki Poulose <Suzuki.Poulose(a)arm.com>; Mike Leach
> <Mike.Leach(a)arm.com>; Alexander Shishkin
> <alexander.shishkin(a)linux.intel.com>
> Cc: Jonathan Corbet <corbet(a)lwn.net>; Randy Dunlap
> <rdunlap(a)infradead.org>; Shuah Khan <skhan(a)linuxfoundation.org>;
> coresight(a)lists.linaro.org; linux-arm-kernel(a)lists.infradead.org; linux-
> doc(a)vger.kernel.org; linux-kernel(a)vger.kernel.org
> Subject: [PATCH v2 3/4] coresight: etm4x: Report the external outputs the
> PMU counts
>
> Some CPUs count the trace unit's external outputs as the PMU common
> events TRCEXTOUT0-3 (0x4010-0x4013), which lets a configuration drive a
> PMU event from trace unit events. Other CPUs, Neoverse N1 for example,
> have no such events, and a feature relying on them would silently do
> nothing there.
>
> Detect at probe, on the trace unit's CPU, which outputs the PMU counts:
> the trace unit has an external output for each of its events
> (TRCIDR0.NUMEVENT), and from PMUv3p1, PMCEID0_EL0[63:32] reports
> which of
> the common events 0x4000-0x401f are implemented. Per the ETE
> specification, an implemented TRCEXTOUTn event counts external output n;
> only whether that output is also an external input is IMPLEMENTATION
> DEFINED.
>
> Add a capability match flag for each output,
> CS_CFG_MATCH_CAP_PMU_EXTOUT(n), set it on ETMs whose PMU counts
> that
> output, and show it in the feature's configfs 'matches' attribute. With
> capabilities matched separately from the device class, a feature that
> requires one only loads on those ETMs.
>
The ability of the PMU to count extout events is a feature of the PMU, not a feature of the ETM/ETE.
The capability to use extout in a configuration should be predicated solely on the correctly interpreted values of TRCIDR0 and TRCIDR4 - the number of available extout events.
There does not have to be a valid pmu counter for a configuration using extout to work correctly - indeed the extout connections are often implementation defined and sometimes connected via coresight CTI.
If we have a use case that requires extout to trigger PMUs, then clearly we have both trace software and PMU software that must be initialised and run. It seems more relevant to me that the PMU software should check that it can count the extout when it is run, especially given the PMU command line detailed in the next patch is in part " -e armv8_pmuv3_0/trcextout1,aux-action=pause,period=1000," - specifically identifying extout1 as a parameter
> Assisted-by: Devmate:Opus-5.5
> Signed-off-by: Amir Ayupov <aaupov(a)fb.com>
> ---
> .../hwtracing/coresight/coresight-config.h | 4 +++
> .../hwtracing/coresight/coresight-etm4x-cfg.c | 5 ++-
> .../coresight/coresight-etm4x-core.c | 32 +++++++++++++++++++
> drivers/hwtracing/coresight/coresight-etm4x.h | 3 ++
> .../coresight/coresight-syscfg-configfs.c | 7 ++++
> 5 files changed, 50 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-config.h
> b/drivers/hwtracing/coresight/coresight-config.h
> index af6ef96b9ae01..10e95f5ecc8d9 100644
> --- a/drivers/hwtracing/coresight/coresight-config.h
> +++ b/drivers/hwtracing/coresight/coresight-config.h
> @@ -35,6 +35,10 @@
> * a device that matches one of its classes and has all of its capabilities.
> */
> #define CS_CFG_MATCH_CAP_MASK 0x0000ff00
> +/* trace unit external output n is countable by the PMU as TRCEXTOUTn */
> +#define CS_CFG_MATCH_CAP_PMU_EXTOUT_SHIFT 8
> +#define CS_CFG_MATCH_CAP_PMU_EXTOUT_NR 4 /*
> TRCEXTOUT0-3 */
> +#define CS_CFG_MATCH_CAP_PMU_EXTOUT(n)
> BIT(CS_CFG_MATCH_CAP_PMU_EXTOUT_SHIFT + (n))
>
> /* flags defining device instance matching - used in config match desc data. */
> #define CS_CFG_MATCH_INST_ANY 0x80000000 /* any instance
> of a class */
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-cfg.c
> b/drivers/hwtracing/coresight/coresight-etm4x-cfg.c
> index e1a59b4345052..09a7a6b86968c 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-cfg.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-cfg.c
> @@ -174,9 +174,12 @@ static int etm4_cfg_load_feature(struct
> coresight_device *csdev,
>
> int etm4_cscfg_register(struct coresight_device *csdev)
> {
> + struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev-
> >dev.parent);
> struct cscfg_csdev_feat_ops ops;
> + u32 match_flags = CS_CFG_ETM4_MATCH_FLAGS;
>
> ops.load_feat = &etm4_cfg_load_feature;
> + match_flags |= (u32)drvdata->pmu_extout <<
> CS_CFG_MATCH_CAP_PMU_EXTOUT_SHIFT;
>
> - return cscfg_register_csdev(csdev, CS_CFG_ETM4_MATCH_FLAGS,
> &ops);
> + return cscfg_register_csdev(csdev, match_flags, &ops);
> }
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c
> b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> index 2247ad55d4442..1e78774025d13 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c
> @@ -30,6 +30,7 @@
> #include <linux/uaccess.h>
> #include <linux/perf_event.h>
> #include <linux/perf/arm_pmu.h>
> +#include <linux/perf/arm_pmuv3.h>
> #include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/property.h>
> @@ -1368,6 +1369,35 @@ static void etm4_fixup_wrong_ccitmin(struct
> etmv4_drvdata *drvdata)
> }
> }
>
> +/*
> + * Find the external outputs of this trace unit that the PMU counts as the
> + * common events TRCEXTOUT0-3. The trace unit has an external output for
> each
> + * of its events, and PMCEID0_EL0[63:32] reports the common events
> + * 0x4000-0x401f from PMUv3p1.
> + *
> + * Must run on the CPU that owns the trace unit.
> + */
> +static u8 etm4_pmu_extout(struct etmv4_drvdata *drvdata)
> +{
> + int pmuver = read_pmuver();
> + u64 pmceid;
> + u8 extout = 0;
> + int n;
> +
> + if (!pmuv3_implemented(pmuver) || pmuver <
> ID_AA64DFR0_EL1_PMUVer_V3P1)
> + return 0;
> +
> + pmceid = read_pmceid0() >> 32;
> + /* nr_event is TRCIDR0.NUMEVENT, the number of events minus one
> */
Not necessarily - this value depends on the ETM version.
> + for (n = 0; n <= drvdata->nr_event; n++) {
> + if (pmceid &
> BIT_ULL(ARMV8_PMUV3_PERFCTR_TRCEXTOUT0 + n -
> +
> ARMV8_PMUV3_EXT_COMMON_EVENT_BASE))
> + extout |= BIT(n);
> + }
> +
> + return extout;
> +}
> +
> static void etm4_init_arch_data(void *info)
> {
> u32 etmidr0;
> @@ -1522,6 +1552,8 @@ static void etm4_init_arch_data(void *info)
> /* NUMCNTR, bits[30:28] number of counters available for tracing */
> drvdata->nr_cntr = FIELD_GET(TRCIDR5_NUMCNTR_MASK, etmidr5);
>
> + drvdata->pmu_extout = etm4_pmu_extout(drvdata);
> +
> coresight_clear_self_claim_tag_unlocked(csa);
> etm4_cs_lock(drvdata, csa);
> cpu_detect_trace_filtering(drvdata);
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h
> b/drivers/hwtracing/coresight/coresight-etm4x.h
> index df9e0748d71ec..11d95a4518b88 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x.h
> +++ b/drivers/hwtracing/coresight/coresight-etm4x.h
> @@ -979,6 +979,8 @@ struct etmv4_save_state {
> * @nrseqstate: The number of sequencer states that are implemented.
> * @nr_seq_ctrls: The number of sequence state transition control registers.
> * @nr_event: Indicates how many events the trace unit support.
> + * @pmu_extout: Bitmap of the external outputs n that the PMU counts
> as
> + * TRCEXTOUTn.
> * @nr_resource:The number of resource selection pairs available for tracing.
> * @nr_ss_cmp: Number of single-shot comparator controls that are
> available.
> * @trcid: value of the current ID for this component.
> @@ -1045,6 +1047,7 @@ struct etmv4_drvdata {
> u8 nrseqstate;
> u8 nr_seq_ctrls;
> u8 nr_event;
> + u8 pmu_extout;
PMU connection to extout a feature of PMU not the etm. We don't want to add every single extout connection use-case into the ETM driver. Wouldn't scale well.
Regards
Mike.
> u8 nr_resource;
> u8 nr_ss_cmp;
> u8 trcid;
> diff --git a/drivers/hwtracing/coresight/coresight-syscfg-configfs.c
> b/drivers/hwtracing/coresight/coresight-syscfg-configfs.c
> index 2b40e556be872..7893d40f2e9ea 100644
> --- a/drivers/hwtracing/coresight/coresight-syscfg-configfs.c
> +++ b/drivers/hwtracing/coresight/coresight-syscfg-configfs.c
> @@ -243,6 +243,7 @@ static ssize_t cscfg_feat_matches_show(struct
> config_item *item, char *page)
> struct
> cscfg_fs_feature, group);
> u32 match_flags = fs_feat->feat_desc->match_flags;
> int used = 0;
> + int n;
>
> if (match_flags & CS_CFG_MATCH_CLASS_SRC_ALL)
> used = scnprintf(page, PAGE_SIZE, "SRC_ALL ");
> @@ -250,6 +251,12 @@ static ssize_t cscfg_feat_matches_show(struct
> config_item *item, char *page)
> if (match_flags & CS_CFG_MATCH_CLASS_SRC_ETM4)
> used += scnprintf(page + used, PAGE_SIZE - used,
> "SRC_ETMV4 ");
>
> + for (n = 0; n < CS_CFG_MATCH_CAP_PMU_EXTOUT_NR; n++) {
> + if (match_flags & CS_CFG_MATCH_CAP_PMU_EXTOUT(n))
> + used += scnprintf(page + used, PAGE_SIZE - used,
> + "PMU_EXTOUT%d ", n);
> + }
> +
> used += scnprintf(page + used, PAGE_SIZE - used, "\n");
> return used;
> }
> --
> 2.52.0
On Tue, 10 Nov 2026 09:21:13 +0800, Jie Gan wrote:
> The CoreSight TNOC (Trace Network-On-Chip) binding so far only allowed the
> two-string AMBA form "qcom,coresight-tnoc", "arm,primecell". That form
> forces the device onto the AMBA bus, where the driver must read the
> peripheral ID from the device registers during probe. On several QCOM
> platforms this AMBA peripheral-ID probing fails, so the traceNoC device
> never probes and its trace path is unavailable.
>
> [...]
Applied, thanks!
[1/5] dt-bindings: arm: coresight-tnoc: Bind on platform bus instead of AMBA
https://git.kernel.org/coresight/c/76e192f4d40a
[2/5] coresight: tnoc: Bind Aggregator TNOC on the platform bus
https://git.kernel.org/coresight/c/4d443f2e0956
[3/5] arm64: dts: qcom: kaanapali: bind traceNoC on the platform bus
https://git.kernel.org/coresight/c/50e7796ab751
[4/5] arm64: dts: qcom: sm8750: bind traceNoC on the platform bus
https://git.kernel.org/coresight/c/f599d281541e
[5/5] arm64: dts: qcom: glymur: use Aggregator TNOC compatible
https://git.kernel.org/coresight/c/1352ce9c99bd
Best regards,
--
Suzuki K Poulose <suzuki.poulose(a)arm.com>
On 09/11/2026 01:24, Jie Gan wrote:
>
>
> On 5/13/2026 9:32 AM, Jie Gan wrote:
>> Two related leaks when _coresight_build_path() encounters an error after
>> coresight_grab_device() has already incremented the pm_runtime, module,
>> and device references for a node:
>>
>> 1. In _coresight_build_path(), if kzalloc_obj() for the path node fails
>> after coresight_grab_device() succeeds, coresight_drop_device() was
>> never called, permanently leaking all three references.
>>
>> 2. In coresight_build_path(), on failure the partial path was freed with
>> kfree(path) instead of coresight_release_path(path). kfree() only
>> frees the coresight_path struct itself; it does not iterate path_list
>> to call coresight_drop_device() and kfree() for each coresight_node
>> already added by deeper recursive calls, leaking both the pm_runtime,
>> module, and device references and the node memory for every element
>> on the partial path.
>>
>> Fix both by adding coresight_drop_device() in the OOM unwind of
>> _coresight_build_path(), and replacing kfree(path) with
>> coresight_release_path(path) in coresight_build_path().
>>
>> Fixes: 32b0707a4182 ("coresight: Add try_get_module() in
>> coresight_grab_device()")
>> Fixes: b3e94405941e ("coresight: associating path with session rather
>> than tracer")
>> Signed-off-by: Jie Gan <jie.gan(a)oss.qualcomm.com>
>
> Gentle ping.
>
>> ---
>> drivers/hwtracing/coresight/coresight-core.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/
>> hwtracing/coresight/coresight-core.c
>> index 46f247f73cf6..c1354ea8e11d 100644
>> --- a/drivers/hwtracing/coresight/coresight-core.c
>> +++ b/drivers/hwtracing/coresight/coresight-core.c
>> @@ -825,8 +825,10 @@ static int _coresight_build_path(struct
>> coresight_device *csdev,
>> return ret;
>> node = kzalloc_obj(struct coresight_node);
>> - if (!node)
>> + if (!node) {
>> + coresight_drop_device(csdev);
>> return -ENOMEM;
>> + }
>> node->csdev = csdev;
>> list_add(&node->link, &path->path_list);
>> @@ -851,7 +853,7 @@ struct coresight_path *coresight_build_path(struct
>> coresight_device *source,
>> rc = _coresight_build_path(source, source, sink, path);
>> if (rc) {
>> - kfree(path);
>> + coresight_release_path(path);
@Suzuki, there's a conflict here. This will need to be
coresight_release_path_locked() if we also take "coresight: etm-perf:
Serialize AUX topology access" from my Sashiko fixes.
>> return ERR_PTR(rc);
>> }
>>
>> ---
>> base-commit: e98d21c170b01ddef366f023bbfcf6b31509fa83
>> change-id: 20260513-fix-memory-leak-issue-034b4a45265e
>>
>> Best regards,
>
On Tue, 27 Oct 2026 23:14:56 +0800, Chao Xu wrote:
> The CoreSight SoC-600 TRM, section 10.11.2, PRIORITYCONTROL, a funnel
> rejects priority register writes whenever any port is enabled. The
> current sequence therefore prevent the configured priorities from
> taking effect. Write the priority register before enabling the
> first port.
>
>
> [...]
Applied, thanks!
[1/1] coresight: funnel: inport schedule by priority can not take work
https://git.kernel.org/coresight/c/533e91f192eb
Best regards,
--
Suzuki K Poulose <suzuki.poulose(a)arm.com>
On Fri, 10 Jul 2026 09:14:46 +0800, Jie Gan wrote:
> Found a clock imbalance issue when remove the CTCU module.
>
> coresight_get_enable_clocks() enables the programming clock and the
> optional AT clock through devm_clk_get_optional_enabled(), which also
> registers a devm action to call clk_disable_unprepare() when the driver
> detaches.
>
> [...]
Applied, thanks!
[1/2] coresight: Fix clock refcount imbalance on platform remove
https://git.kernel.org/coresight/c/c2d0f71617f4
[2/2] coresight: tnoc: Fix clock refcount imbalance on platform remove
https://git.kernel.org/coresight/c/69285a3b57db
Best regards,
--
Suzuki K Poulose <suzuki.poulose(a)arm.com>
On Wed, 02 Sep 2026 17:41:43 +0800, Jie Gan wrote:
> For a tnoc device not on the AMBA bus, atid was set to -EOPNOTSUPP.
> trace_noc_id() returns this value directly to
> coresight_path_assign_trace_id(), which only treats a literal 0
> return as "this device has no ID, keep searching the path" -
> any other value is checked against IS_VALID_CS_TRACE_ID() and
> rejected. A negative atid therefore made path assignment fail with
> -EINVAL instead of falling through to the next device in the path
> that could supply a valid trace ID.
>
> [...]
Applied, thanks!
[1/1] coresight: tnoc: fix trace ID path assignment failure on non-AMBA tnoc
https://git.kernel.org/coresight/c/bfe43f1d7905
Best regards,
--
Suzuki K Poulose <suzuki.poulose(a)arm.com>
On Wed, 08 Apr 2026 21:23:44 +0800, Jie Gan wrote:
> Several sysfs show/store handlers check csdev->refcnt before acquiring
> the spinlock, then access hardware registers inside the lock. This is
> a race: between the check and the lock acquisition, the following can
> occur on another CPU:
>
> CPU 0 (sysfs reader) CPU 1 (disable path)
> ───────────────────────────── ──────────────────────────────────
> refcnt == 1, check passes
> [waiting for spinlock] tpda_disable(): refcnt → 0
> debug clock disabled
> spinlock acquired
> readl_relaxed() ← FAULT/hang
>
> [...]
Applied, thanks!
[1/1] coresight: tpda: fix race between refcnt check and register access
https://git.kernel.org/coresight/c/4f5f1e5ae120
Best regards,
--
Suzuki K Poulose <suzuki.poulose(a)arm.com>
Small fixes for bugs in the CoreSight drivers that were found by
Sashiko. Mostly reference and resource leaks on error paths, plus a
deadlock, a missing lock, and a sysfs store that should return -EBUSY
while a sysfs session is enabled.
Assisted by Claude Opus 5.5 and Sashiko
Signed-off-by: James Clark <james.clark(a)linaro.org>
---
Changes in v2:
- Cherry pick "coresight: etm-perf: Serialize AUX topology access"
into this set so that it now has no dependencies.
- Drop "coresight: cpu-debug: Fix PM usage counter leak in
debug_enable_func()" which is fixed more generally by
https://lore.kernel.org/linux-arm-kernel/20260911-b4-coresight-runtime-pm-f…
- Link to v1: https://patch.msgid.link/20261027-james-cs-sashiko-easy-fixes-1-v1-0-db43c4…
---
James Clark (9):
coresight: etm-perf: Serialize AUX topology access
coresight: etm4x: Remove perf symlink if config registration fails
coresight: etm4x: Fix truncation of nr_ext_inp
coresight: etm-perf: Fix sink device reference leak in etm_setup_aux()
coresight: syscfg: Take csdev lock when removing owned features
coresight: syscfg: Fix deadlock in cscfg_create_device() error path
coresight: Fix resource leaks on coresight_build_path() errors
coresight: etm3x: Don't ignore etm_parse_event_config() errors
coresight: etm3x: Prohibit modifying seq_curr_state while session is enabled
drivers/hwtracing/coresight/coresight-core.c | 26 +++++++++++++++++-----
drivers/hwtracing/coresight/coresight-etm-perf.c | 15 +++++++++----
drivers/hwtracing/coresight/coresight-etm3x-core.c | 6 ++++-
.../hwtracing/coresight/coresight-etm3x-sysfs.c | 5 +++++
drivers/hwtracing/coresight/coresight-etm4x-core.c | 1 +
drivers/hwtracing/coresight/coresight-etm4x.h | 2 +-
drivers/hwtracing/coresight/coresight-priv.h | 1 +
drivers/hwtracing/coresight/coresight-syscfg.c | 8 ++++++-
drivers/hwtracing/coresight/coresight-sysfs.c | 4 ++--
9 files changed, 53 insertions(+), 15 deletions(-)
---
base-commit: 343cfcbb3ecfdb80aa576a428cfa3b65ad783842
change-id: 20261027-james-cs-sashiko-easy-fixes-1-692d80016a89
Best regards,
--
James Clark <james.clark(a)linaro.org>
On 09/11/2026 01:25, Jie Gan wrote:
>
>
> On 7/10/2026 10:38 AM, Jie Gan wrote:
>> The CoreSight TNOC (Trace Network-On-Chip) binding so far only allowed
>> the
>> two-string AMBA form "qcom,coresight-tnoc", "arm,primecell". That form
>> forces the device onto the AMBA bus, where the driver must read the
>> peripheral ID from the device registers during probe. On several QCOM
>> platforms this AMBA peripheral-ID probing fails, so the traceNoC device
>> never probes and its trace path is unavailable.
>>
>> This series drops the "arm,primecell" entry and turns "qcom,coresight-
>> tnoc"
>> into a standalone platform compatible. Without "arm,primecell" the device
>> is created on the platform bus and probes through the platform driver by
>> compatible string, bypassing the AMBA peripheral-ID read while
>> remaining a
>> fully functional Aggregator TNOC that allocates a system trace ID (ATID).
>>
>> The series is organized as: binding first, then the driver support for
>> the
>> platform-bus compatible, followed by the per-platform DT fixes that
>> switch
>> the affected nodes over to it.
>>
>> - Patch 1 (dt-bindings) drops "arm,primecell" and makes
>> "qcom,coresight-tnoc" a single standalone compatible, and updates the
>> example node accordingly.
>> - Patch 2 (driver) adds "qcom,coresight-tnoc" to the platform driver's
>> match table and renames the itnoc-specific names to generic tnoc names,
>> since the platform driver now serves both the Interconnect and Aggregator
>> TNOC. It also restricts the ATID-unsupported handling to
>> "qcom,coresight-itnoc" only, so the Aggregator TNOC on the platform
>> bus is
>> no longer wrongly covered and correctly allocates a trace ID.
>> - Patches 3-4 (kaanapali, sm8750) drop the "arm,primecell" entry on the
>> traceNoC nodes and use the standalone "qcom,coresight-tnoc" compatible,
>> fixing the probe failure on those platforms.
>> - Patch 5 (glymur) switches the node from "qcom,coresight-itnoc" to
>> "qcom,coresight-tnoc". This node is actually an Aggregator TNOC (its
>> tn_ag_* endpoints show aggregation), so it should expose a system trace
>> ID rather than being treated as an Interconnect TNOC.
>>
>
> Gentle ping.
Apologies for missing this. Please could you resend it based on v7.4-rc,
as this doesn't apply cleanly on coresight/next
Cheers
Suzuki