On 07/11/2025 06:16, Jie Gan wrote:
> Remove the redundant check for drvdata data because the drvdata here already
> has been guarranted to be non-NULL.
>
> Fixes: 350ba15ae187 ("coresight-tpdm: Add nodes for dsb msr support")
> Fixes: 8e8804145a46 ("coresight-tpdm: Add msr register support for CMB")
This doesn't need to be backported as such, as it is a cleanup. I will
drop the Fixes tag and merge this.
Suzuki
> Signed-off-by: Jie Gan <jie.gan(a)oss.qualcomm.com>
> ---
> drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c
> index 0e3896c12f07..06e0a905a67d 100644
> --- a/drivers/hwtracing/coresight/coresight-tpdm.c
> +++ b/drivers/hwtracing/coresight/coresight-tpdm.c
> @@ -1402,11 +1402,11 @@ static int tpdm_probe(struct device *dev, struct resource *res)
> if (ret)
> return ret;
>
> - if (drvdata && tpdm_has_dsb_dataset(drvdata))
> + if (tpdm_has_dsb_dataset(drvdata))
> of_property_read_u32(drvdata->dev->of_node,
> "qcom,dsb-msrs-num", &drvdata->dsb_msr_num);
>
> - if (drvdata && tpdm_has_cmb_dataset(drvdata))
> + if (tpdm_has_cmb_dataset(drvdata))
> of_property_read_u32(drvdata->dev->of_node,
> "qcom,cmb-msrs-num", &drvdata->cmb_msr_num);
> } else {
>
> ---
> base-commit: df5d79720b152e7ff058f11ed7e88d5b5c8d2a0c
> change-id: 20251107-fix_tpdm_redundant_check-a5a7bad4b7c8
> prerequisite-change-id: 20251028-add_static_tpdm_support-1f62477857e2:v4
> prerequisite-patch-id: eda8dd6884b831cb10affc22477aece39c78b408
> prerequisite-patch-id: 7beb8b17d54ff21bc57eab10b56e6ffcfa4d1963
> prerequisite-patch-id: f6f1e78dba3f1d3b1191ab827adab5a3b7b2326a
>
> Best regards,
The sysfs files that change the operational parameters for TMC buffer_size,
stop_on_flush and trigger_cntr are writable when the TMC is in use.
The new values will have no effect and be silently ignored.
Alter the sysfs functions to return -EBUSY if the TMC is currently
in use, and also protect the write values using the spinlock.
Signed-off-by: Mike Leach <mike.leach(a)linaro.org>
---
.../hwtracing/coresight/coresight-tmc-core.c | 41 ++++++++++++++++---
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c
index 36599c431be6..a1216a1f9681 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-core.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-core.c
@@ -489,15 +489,24 @@ static ssize_t trigger_cntr_store(struct device *dev,
const char *buf, size_t size)
{
int ret;
- unsigned long val;
+ unsigned long val, flags;
struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent);
ret = kstrtoul(buf, 16, &val);
if (ret)
return ret;
+ /* do not permit write if the sink is currently in use */
+ raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ if (coresight_get_mode(drvdata->csdev) != CS_MODE_DISABLED) {
+ ret = -EBUSY;
+ goto out;
+ }
drvdata->trigger_cntr = val;
- return size;
+ ret = size;
+out:
+ raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ return ret;
}
static DEVICE_ATTR_RW(trigger_cntr);
@@ -514,7 +523,7 @@ static ssize_t buffer_size_store(struct device *dev,
const char *buf, size_t size)
{
int ret;
- unsigned long val;
+ unsigned long val, flags;
struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent);
/* Only permitted for TMC-ETRs */
@@ -527,8 +536,18 @@ static ssize_t buffer_size_store(struct device *dev,
/* The buffer size should be page aligned */
if (val & (PAGE_SIZE - 1))
return -EINVAL;
+
+ /* do not permit write if the sink is currently in use */
+ raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ if (coresight_get_mode(drvdata->csdev) != CS_MODE_DISABLED) {
+ ret = -EBUSY;
+ goto out;
+ }
drvdata->size = val;
- return size;
+ ret = size;
+out:
+ raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ return ret;
}
static DEVICE_ATTR_RW(buffer_size);
@@ -547,17 +566,27 @@ static ssize_t stop_on_flush_store(struct device *dev,
{
int ret;
u8 val;
+ unsigned long flags;
struct tmc_drvdata *drvdata = dev_get_drvdata(dev->parent);
ret = kstrtou8(buf, 0, &val);
if (ret)
return ret;
+
+ /* do not permit write if the sink is currently in use */
+ raw_spin_lock_irqsave(&drvdata->spinlock, flags);
+ if (coresight_get_mode(drvdata->csdev) != CS_MODE_DISABLED) {
+ ret = -EBUSY;
+ goto out;
+ }
if (val)
drvdata->stop_on_flush = true;
else
drvdata->stop_on_flush = false;
-
- return size;
+ ret = size;
+out:
+ raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
+ return ret;
}
static DEVICE_ATTR_RW(stop_on_flush);
--
2.32.0
On Tue, 28 Oct 2025 18:11:39 +0800, Jie Gan wrote:
> The static TPDM function as a dummy source, however, it is essential
> to enable the port connected to the TPDA and configure the element size.
> Without this, the TPDA cannot correctly receive trace data from the
> static TPDM. Since the static TPDM does not require MMIO mapping to
> access its registers, a clock controller is not mandatory for its
> operation.
>
> [...]
Applied, thanks!
[1/3] dt-bindings: arm: document the static TPDM compatible
https://git.kernel.org/coresight/c/8d204b6f1f7a
[2/3] coresight: tpdm: add static tpdm support
https://git.kernel.org/coresight/c/14ae052f7947
Best regards,
--
Suzuki K Poulose <suzuki.poulose(a)arm.com>
Hi,
On Mon, 3 Nov 2025 at 08:46, Yingchao Deng
<yingchao.deng(a)oss.qualcomm.com> wrote:
>
> >Hi,
> >
> >This set is looking good now and appears to be getting close to being ready.
> >
> >There are a few minor issues in the second patch and a few items that
> >need to be confirmed.
> >1) I note that you removed the code to prevent calling claim/disclaim.
> >Does this mean that you confirm that you have tested the patch update
> >for claim tags I posted works on your system?
>
> I just tested this patch, the default value of qcom_cti's CLAIMSET register is 0xf,
> and unlike the standard CTI (write 0 is no effect), it can be written with 0.
> So, is it acceptable to write 0 to the claimset register of qcom_cti after reading the
> devarch register during the probe phase?
>
> devarch = readl_relaxed(drvdata->base + CORESIGHT_DEVARCH);
> if (CTI_DEVARCH_ARCHITECT(devarch) == ARCHITECT_QCOM) {
> drvdata->subtype = QCOM_CTI;
> drvdata->offsets = cti_extended_offset;
> writel_relaxed(0, drvdata->base + CORESIGHT_CLAIMSET);
> } else {
> drvdata->subtype = ARM_STD_CTI;
> drvdata->offsets = cti_normal_offset;
> }
>
OK - if you look at v2 of the cliam tag set you will see we introduce
a "claim_tag_info" attribute to the coresight_device structure. This
is initially set to CS_CLAIM_TAG_UNKNOWN, and on the first
claim/disclaim API call the claim tags validity will be tested and a
value of CS_CLAIM_TAG_STD_PROTOCOL or CS_CLAIM_TAG_NOT_IMPL set,
skipping the test on all subsequent claim calls.
if you set this in the probe function i.e. csdev->claim_tag_info =
CS_CLAIM_TAG_NOT_IMPL, then the claim tags will not be used.
whichever method you use, please ensure a comment appears in the code
describing why the workaround is necessary.
Regards
Mike
> >2) In patch 2 I made some comments in regard to ARCH values - please
> >confirm that these are accurate and have been tested as working on
> >your system
>
> Yes, the bits 31:20 in qcom_cti's DEVARCH register are 0x8EF.
>
> >3) As mentioned in the comments to patch 2 - you need to update the
> >docs for the new sysfs selection file you have added
>
> Will update in v6.
>
> Thanks
> Yingchao
>
> >
> >Thanks and Regards
> >
> >Mike
> >
> >On Mon, 20 Oct 2025 at 08:12, Yingchao Deng
> ><yingchao.deng(a)oss.qualcomm.com> wrote:
> >>
> >> The QCOM extended CTI is a heavily parameterized version of ARM’s CSCTI.
> >> It allows a debugger to send to trigger events to a processor or to send
> >> a trigger event to one or more processors when a trigger event occurs on
> >> another processor on the same SoC, or even between SoCs.
> >>
> >> QCOM extended CTI supports up to 128 triggers. And some of the register
> >> offsets are changed.
> >>
> >> The commands to configure CTI triggers are the same as ARM's CTI.
> >>
> >> Changes in v5:
> >> 1. Move common part in qcom-cti.h to coresight-cti.h.
> >> 2. Convert trigger usage fields to dynamic bitmaps and arrays.
> >> 3. Fix holes in struct cti_config to save some space.
> >> 4. Revert the previous changes related to the claim tag in
> >> cti_enable/disable_hw.
> >> Link to v4 - https://lore.kernel.org/linux-arm-msm/20250902-extended_cti-v4-1-7677de04b4…
> >>
> >> Changes in v4:
> >> 1. Read the DEVARCH registers to identify Qualcomm CTI.
> >> 2. Add a reg_idx node, and refactor the coresight_cti_reg_show() and
> >> coresight_cti_reg_store() functions accordingly.
> >> 3. The register offsets specific to Qualcomm CTI are moved to qcom_cti.h.
> >> Link to v3 - https://lore.kernel.org/linux-arm-msm/20250722081405.2947294-1-quic_jinlmao…
> >>
> >> Changes in v3:
> >> 1. Rename is_extended_cti() to of_is_extended_cti().
> >> 2. Add the missing 'i' when write the CTI trigger registers.
> >> 3. Convert the multi-line output in sysfs to single line.
> >> 4. Initialize offset arrays using designated initializer.
> >> Link to V2 - https://lore.kernel.org/all/20250429071841.1158315-3-quic_jinlmao@quicinc.c…
> >>
> >> Changes in V2:
> >> 1. Add enum for compatible items.
> >> 2. Move offset arrays to coresight-cti-core
> >>
> >> Signed-off-by: Jinlong Mao <jinlong.mao(a)oss.qualcomm.com>
> >> Signed-off-by: Yingchao Deng <yingchao.deng(a)oss.qualcomm.com>
> >> ---
> >> Yingchao Deng (2):
> >> coresight: cti: Convert trigger usage fields to dynamic bitmaps and arrays
> >> coresight: cti: Add Qualcomm extended CTI support
> >>
> >> drivers/hwtracing/coresight/coresight-cti-core.c | 144 +++++++++++++---
> >> .../hwtracing/coresight/coresight-cti-platform.c | 16 +-
> >> drivers/hwtracing/coresight/coresight-cti-sysfs.c | 184 +++++++++++++++------
> >> drivers/hwtracing/coresight/coresight-cti.h | 60 ++++++-
> >> drivers/hwtracing/coresight/qcom-cti.h | 29 ++++
> >> 5 files changed, 346 insertions(+), 87 deletions(-)
> >> ---
> >> base-commit: 1fdbb3ff1233e204e26f9f6821ae9c125a055229
> >> change-id: 20251016-extended_cti-2a426c8894b1
> >>
> >> Best regards,
> >> --
> >> Yingchao Deng <yingchao.deng(a)oss.qualcomm.com>
> >>
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK
On Tue, Oct 21, 2025 at 04:45:25PM +0800, Xiaoqi Zhuang wrote:
> When ETR is enabled as CS_MODE_SYSFS, if the buffer size is changed
> and enabled again, currently sysfs_buf will point to the newly
> allocated memory(buf_new) and free the old memory(buf_old). But the
> etr_buf that is being used by the ETR remains pointed to buf_old, not
> updated to buf_new. In this case, it will result in a memory
> use-after-free issue.
>
> Fix this by checking ETR's mode before updating and releasing buf_old,
> if the mode is CS_MODE_SYSFS, then skip updating and releasing it.
>
> Fixes: bd2767ec3df2 ("coresight: Fix run time warnings while reusing ETR buffer")
> Signed-off-by: Xiaoqi Zhuang <xiaoqi.zhuang(a)oss.qualcomm.com>
Tested on my Juno board with below steps:
1) Enable the first path: ETM2 -> ETR0
echo 1 > /sys/bus/coresight/devices/tmc_etr0/enable_sink
echo 1 > /sys/bus/coresight/devices/etm2/enable_source
2) Enlarge buffer size from 1MiB to 4MiB
cat /sys/bus/coresight/devices/tmc_etr0/buffer_size
0x100000
echo 0x400000 > /sys/bus/coresight/devices/tmc_etr0/buffer_size
3) Enable the second path: ETM0 -> ETR0
echo 1 > /sys/bus/coresight/devices/etm0/enable_source
4) Disable paths
echo 0 > /sys/bus/coresight/devices/etm0/enable_source
echo 0 > /sys/bus/coresight/devices/etm2/enable_source
Without this patch, the oops will be triggered when disable paths.
I can confirm this patch does dismiss the issue.
Tested-by: Leo Yan <leo.yan(a)arm.com>
> ---
> Changes in v3:
> - Add a fix tag for the fix patch.
> - Link to v2: https://lore.kernel.org/r/20251021-fix_etr_issue-v2-1-80c40c9cac8c@oss.qual…
>
> Changes in v2:
> - Exit earlier to avoid allocating memory unnecessarily.
> - Link to v1: https://lore.kernel.org/r/20251020-fix_etr_issue-v1-1-902ab51770b4@oss.qual…
> ---
> drivers/hwtracing/coresight/coresight-tmc-etr.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> index b07fcdb3fe1a..800be06598c1 100644
> --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
> +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
> @@ -1250,6 +1250,13 @@ static struct etr_buf *tmc_etr_get_sysfs_buffer(struct coresight_device *csdev)
> * with the lock released.
> */
> raw_spin_lock_irqsave(&drvdata->spinlock, flags);
> +
> + /*
> + * If the ETR is already enabled, continue with the existing buffer.
> + */
> + if (coresight_get_mode(csdev) == CS_MODE_SYSFS)
> + goto out;
> +
> sysfs_buf = READ_ONCE(drvdata->sysfs_buf);
> if (!sysfs_buf || (sysfs_buf->size != drvdata->size)) {
> raw_spin_unlock_irqrestore(&drvdata->spinlock, flags);
>
> ---
> base-commit: 98ac9cc4b4452ed7e714eddc8c90ac4ae5da1a09
> change-id: 20251020-fix_etr_issue-02c706dbc899
>
> Best regards,
> --
> Xiaoqi Zhuang <xiaoqi.zhuang(a)oss.qualcomm.com>
>
>
This series is extracted from the CoreSight power management fixes and
refactoring [1], focusing on ETMv3/4 power management. The remaining
parts will be sent out separately. Hopefully, this makes things easier
for us to review and merge.
Compared to the previous version, only one new patch has been added — to
retain the sequencer state for ETMv4. No other changes are included.
This series has been verified on Juno-r2 platform.
[1] https://lore.kernel.org/linux-arm-kernel/20250915-arm_coresight_power_manag…
---
Changes in v4:
- Added patch 10 for retaining sequencer state in ETMv4 driver (Mike).
- Added Mike's review tags.
- Added James' test tags.
- Link to v3: https://lore.kernel.org/r/20250915-arm_coresight_power_management_fix-v3-0-…
Changes in v3:
- Fixed building failure in ETMv3 driver (kernel test robot).
- Refactoring ETMv3 change for checking CPU ID (Levi).
- Fixed NULL pointer issue during CPU idle (James).
- Fixed lockdep complaint for HARDIRQ-safe and HARDIRA-unsafe (James).
- Fixed acquiring mutex in atomic context (James).
- Rebased on the latest coresight-next branch.
- Link to v2: https://lore.kernel.org/r/20250701-arm_cs_pm_fix_v3-v2-0-23ebb864fcc1@arm.c…
Changes in v2:
- Refactored ETMv4 suspend and resume for reusing the normal enabling
and disabling flows (James).
- Used a per-CPU structure to maintain path pointers (James).
- Supported helpers in CPU PM flows (James).
- Fixed the SMP-safe access to device mode.
- Fixed the context synchronization in ETMv4x driver.
- Link to v1: https://lore.kernel.org/linux-arm-kernel/20250516160742.1200904-1-leo.yan@a…
Signed-off-by: Leo Yan <leo.yan(a)arm.com>
---
Leo Yan (11):
coresight: Change device mode to atomic type
coresight: etm4x: Always set tracer's device mode on target CPU
coresight: etm3x: Always set tracer's device mode on target CPU
coresight: etm4x: Correct polling IDLE bit
coresight: etm4x: Ensure context synchronization is not ignored
coresight: etm4x: Add context synchronization before enabling trace
coresight: etm4x: Properly control filter in CPU idle with FEAT_TRF
coresight: etm4x: Remove the state_needs_restore flag
coresight: etm4x: Add flag to control single-shot restart
coresight: etm4x: Retain sequencer state
coresight: etm4x: Reuse normal enable and disable logic in CPU idle
drivers/hwtracing/coresight/coresight-etm3x-core.c | 59 ++--
drivers/hwtracing/coresight/coresight-etm4x-core.c | 372 +++++++--------------
drivers/hwtracing/coresight/coresight-etm4x.h | 62 ----
include/linux/coresight.h | 25 +-
4 files changed, 175 insertions(+), 343 deletions(-)
---
base-commit: 6fab32bb6508abbb8b7b1c5498e44f0c32320ed5
change-id: 20250909-arm_coresight_power_management_fix-139873f942e8
Best regards,
--
Leo Yan <leo.yan(a)arm.com>
Hi,
This set is looking good now and appears to be getting close to being ready.
There are a few minor issues in the second patch and a few items that
need to be confirmed.
1) I note that you removed the code to prevent calling claim/disclaim.
Does this mean that you confirm that you have tested the patch update
for claim tags I posted works on your system?
2) In patch 2 I made some comments in regard to ARCH values - please
confirm that these are accurate and have been tested as working on
your system
3) As mentioned in the comments to patch 2 - you need to update the
docs for the new sysfs selection file you have added
Thanks and Regards
Mike
On Mon, 20 Oct 2025 at 08:12, Yingchao Deng
<yingchao.deng(a)oss.qualcomm.com> wrote:
>
> The QCOM extended CTI is a heavily parameterized version of ARM’s CSCTI.
> It allows a debugger to send to trigger events to a processor or to send
> a trigger event to one or more processors when a trigger event occurs on
> another processor on the same SoC, or even between SoCs.
>
> QCOM extended CTI supports up to 128 triggers. And some of the register
> offsets are changed.
>
> The commands to configure CTI triggers are the same as ARM's CTI.
>
> Changes in v5:
> 1. Move common part in qcom-cti.h to coresight-cti.h.
> 2. Convert trigger usage fields to dynamic bitmaps and arrays.
> 3. Fix holes in struct cti_config to save some space.
> 4. Revert the previous changes related to the claim tag in
> cti_enable/disable_hw.
> Link to v4 - https://lore.kernel.org/linux-arm-msm/20250902-extended_cti-v4-1-7677de04b4…
>
> Changes in v4:
> 1. Read the DEVARCH registers to identify Qualcomm CTI.
> 2. Add a reg_idx node, and refactor the coresight_cti_reg_show() and
> coresight_cti_reg_store() functions accordingly.
> 3. The register offsets specific to Qualcomm CTI are moved to qcom_cti.h.
> Link to v3 - https://lore.kernel.org/linux-arm-msm/20250722081405.2947294-1-quic_jinlmao…
>
> Changes in v3:
> 1. Rename is_extended_cti() to of_is_extended_cti().
> 2. Add the missing 'i' when write the CTI trigger registers.
> 3. Convert the multi-line output in sysfs to single line.
> 4. Initialize offset arrays using designated initializer.
> Link to V2 - https://lore.kernel.org/all/20250429071841.1158315-3-quic_jinlmao@quicinc.c…
>
> Changes in V2:
> 1. Add enum for compatible items.
> 2. Move offset arrays to coresight-cti-core
>
> Signed-off-by: Jinlong Mao <jinlong.mao(a)oss.qualcomm.com>
> Signed-off-by: Yingchao Deng <yingchao.deng(a)oss.qualcomm.com>
> ---
> Yingchao Deng (2):
> coresight: cti: Convert trigger usage fields to dynamic bitmaps and arrays
> coresight: cti: Add Qualcomm extended CTI support
>
> drivers/hwtracing/coresight/coresight-cti-core.c | 144 +++++++++++++---
> .../hwtracing/coresight/coresight-cti-platform.c | 16 +-
> drivers/hwtracing/coresight/coresight-cti-sysfs.c | 184 +++++++++++++++------
> drivers/hwtracing/coresight/coresight-cti.h | 60 ++++++-
> drivers/hwtracing/coresight/qcom-cti.h | 29 ++++
> 5 files changed, 346 insertions(+), 87 deletions(-)
> ---
> base-commit: 1fdbb3ff1233e204e26f9f6821ae9c125a055229
> change-id: 20251016-extended_cti-2a426c8894b1
>
> Best regards,
> --
> Yingchao Deng <yingchao.deng(a)oss.qualcomm.com>
>
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK
This patch series introduces support for CPU cluster local CoreSight components,
including funnel, replicator, and TMC, which reside inside CPU cluster
power domains. These components require special handling due to power
domain constraints.
Unlike system-level CoreSight devices, CPU cluster local components share the
power domain of the CPU cluster. When the cluster enters low-power mode (LPM),
the registers of these components become inaccessible. Importantly, `pm_runtime_get`
calls alone are insufficient to bring the CPU cluster out of LPM, making
standard register access unreliable in such cases.
To address this, the series introduces:
- Device tree bindings for CPU cluster local funnel, replicator, and TMC.
- Introduce a cpumask to record the CPUs belonging to the cluster where the
cpu cluster local component resides.
- Safe register access via smp_call_function_single() on CPUs within the
associated cpumask, ensuring the cluster is power-resident during access.
- Delayed probe support for CPU cluster local components when all CPUs of
this CPU cluster are offline, re-probe the component when any CPU in the
cluster comes online.
- Introduce `cs_mode` to link enable interfaces to avoid the use
smp_call_function_single() under perf mode.
Patch summary:
Patch 1: Adds device tree bindings for CPU cluster funnel/replicator/TMC devices.
Patches 2–3: Add support for CPU cluster funnel.
Patches 4-6: Add support for CPU cluster replicator.
Patches 7-10: Add support for CPU cluster TMC.
Patch 11: Add 'cs_mode' to link enable functions.
Patches 12-13: Add Coresight nodes for APSS debug block for x1e80100 and
fix build issue.
Verification:
This series has been verified on sm8750.
Test steps for delay probe:
1. limit the system to enable at most 6 CPU cores during boot.
2. echo 1 >/sys/bus/cpu/devices/cpu6/online.
3. check whether ETM6 and ETM7 have been probed.
Test steps for sysfs mode:
echo 1 >/sys/bus/coresight/devices/tmc_etf0/enable_sink
echo 1 >/sys/bus/coresight/devices/etm0/enable_source
echo 1 >/sys/bus/coresight/devices/etm6/enable_source
echo 0 >/sys/bus/coresight/devices/etm0/enable_source
echo 0 >/sys/bus/coresight/devicse/etm6/enable_source
echo 0 >/sys/bus/coresight/devices/tmc_etf0/enable_sink
echo 1 >/sys/bus/coresight/devices/tmc_etf1/enable_sink
echo 1 >/sys/bus/coresight/devcies/etm0/enable_source
cat /dev/tmc_etf1 >/tmp/etf1.bin
echo 0 >/sys/bus/coresight/devices/etm0/enable_source
echo 0 >/sys/bus/coresight/devices/tmc_etf1/enable_sink
echo 1 >/sys/bus/coresight/devices/tmc_etf2/enable_sink
echo 1 >/sys/bus/coresight/devices/etm6/enable_source
cat /dev/tmc_etf2 >/tmp/etf2.bin
echo 0 >/sys/bus/coresight/devices/etm6/enable_source
echo 0 >/sys/bus/coresight/devices/tmc_etf2/enable_sink
Test steps for sysfs node:
cat /sys/bus/coresight/devices/tmc_etf*/mgmt/*
cat /sys/bus/coresight/devices/funnel*/funnel_ctrl
cat /sys/bus/coresight/devices/replicator*/mgmt/*
Test steps for perf mode:
perf record -a -e cs_etm//k -- sleep 5
Signed-off-by: Yuanfang Zhang <yuanfang.zhang(a)oss.qualcomm.com>
---
Yuanfang Zhang (12):
dt-bindings: arm: coresight: Add cpu cluster tmc/funnel/replicator support
coresight-funnel: Add support for CPU cluster funnel
coresight-funnel: Handle delay probe for CPU cluster funnel
coresight-replicator: Add support for CPU cluster replicator
coresight-replicator: Handle delayed probe for CPU cluster replicator
coresight-replicator: Update mgmt_attrs for CPU cluster replicator compatibility
coresight-tmc: Add support for CPU cluster ETF and refactor probe flow
coresight-tmc-etf: Refactor enable function for CPU cluster ETF support
coresight-tmc: Update tmc_mgmt_attrs for CPU cluster TMC compatibility
coresight-tmc: Handle delayed probe for CPU cluster TMC
coresight: add 'cs_mode' to link enable functions
arm64: dts: qcom: x1e80100: add Coresight nodes for APSS debug block
.../bindings/arm/arm,coresight-dynamic-funnel.yaml | 23 +-
.../arm/arm,coresight-dynamic-replicator.yaml | 22 +-
.../devicetree/bindings/arm/arm,coresight-tmc.yaml | 22 +-
arch/arm64/boot/dts/qcom/x1e80100.dtsi | 885 +++++++++++++++++++++
arch/arm64/boot/dts/qcom/x1p42100.dtsi | 12 +
drivers/hwtracing/coresight/coresight-core.c | 7 +-
drivers/hwtracing/coresight/coresight-funnel.c | 260 +++++-
drivers/hwtracing/coresight/coresight-replicator.c | 343 +++++++-
drivers/hwtracing/coresight/coresight-tmc-core.c | 396 +++++++--
drivers/hwtracing/coresight/coresight-tmc-etf.c | 105 ++-
drivers/hwtracing/coresight/coresight-tmc.h | 10 +
drivers/hwtracing/coresight/coresight-tnoc.c | 3 +-
drivers/hwtracing/coresight/coresight-tpda.c | 3 +-
include/linux/coresight.h | 3 +-
14 files changed, 1912 insertions(+), 182 deletions(-)
---
base-commit: 01f96b812526a2c8dcd5c0e510dda37e09ec8bcd
change-id: 20251016-cpu_cluster_component_pm-ce518f510433
Best regards,
--
Yuanfang Zhang <yuanfang.zhang(a)oss.qualcomm.com>