2023-06-02 08:56:30

by Hao Zhang

[permalink] [raw]
Subject: [PATCH v6 0/3] Add support to configure Coresight Dummy subunit

Introduction of Coresight Dummy subunit
The Coresight Dummy subunit is for Coresight Dummy component, there are
some specific Coresight devices that HLOS don't have permission to access.
Such as some TPDMs, they would be configured in NON-HLOS side, but it's
necessary to build Coresight path for it to debug. So there need driver to
register dummy devices as Coresight devices.

Commit link:
https://git.codelinaro.org/clo/linux-kernel/coresight/-/tree/coresight-dummy-v6

Changes in V6:
1. Add the missing information and update the patch version.

Changes in V5:
1. Follow the alphabetical order for the header files in
coresight-dummy.c. -- Suzuki K Poulose
2. Update the maintainers.
3. Split the Coresight Dummy YAML to 2 schema files.
-- Rob Herring & Krzysztof Kozlowski
4. Update the coresight-dummy.rst file. -- Bagas Sanjaya

Changes in V4:
1. Remove traceid allocation in dummy_probe function since it is
currently not in use, will upstream it as the part of ATID filtering
in the further. -- Suzuki K Poulose
2. Remove 'oneOf' as there is only one entry. -- Rob Herring

Changes in V3:
1. Use API "dev_dbg" to replace "dev_info". -- Suzuki K Poulose
2. Drop "qcom" property and take it as a dummy framework.
-- Suzuki K Poulose
3. Add new sub-type "CORESIGHT_DEV_SUBTYPE_SINK_DUMMY" to support
coresight dummy module -- Mike Leach
4. Use compatibles "arm,coresight-dummy-source" and
"arm,coresight-dummy-sink" to replace property "qcom,dummy-source" and
"qcom,dummy-sink". -- Mike Leach
5. Define source_devs and sink_devs DEVLIST to replace dummy_devs, make
it clear at the first level. -- Mike Leach
6. Modify subject of YAML patch, drop "YAML schema". -- Krzysztof Kozlowski
7. Drop some redundant items and correct syntax errors in yaml file.
-- Krzysztof Kozlowski & Rob Herring
8. Correct required property of yaml file, constrain out ports to
dummy-source and in ports to dummy-sink. -- Mike Leach
9. Drop "Sysfs files and directories" contents of coresight-dummy.rst.
-- Suzuki K Poulose/Greg Kroah-Hartman
10.Correct syntax errors of coresight-dummy.rst. -- Bagas Sanjaya

Changes in V2:
1. Declare dummy_init and dummy_exit as static to fix missing-prototypes
warnings. -- kernel test robot
2. Fix the errors of coresight-dummy yaml file. -- Rob Herring

Hao Zhang (3):
Coresight: Add coresight dummy driver
dt-bindings: arm: Add support for Coresight dummy trace
Documentation: trace: Add documentation for Coresight Dummy Trace

.../arm/arm,coresight-dummy-sink.yaml | 73 ++++++++
.../arm/arm,coresight-dummy-source.yaml | 71 ++++++++
.../trace/coresight/coresight-dummy.rst | 32 ++++
drivers/hwtracing/coresight/Kconfig | 11 ++
drivers/hwtracing/coresight/Makefile | 1 +
drivers/hwtracing/coresight/coresight-dummy.c | 163 ++++++++++++++++++
include/linux/coresight.h | 1 +
7 files changed, 352 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml
create mode 100644 Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml
create mode 100644 Documentation/trace/coresight/coresight-dummy.rst
create mode 100644 drivers/hwtracing/coresight/coresight-dummy.c

--
2.17.1



2023-06-02 08:56:38

by Hao Zhang

[permalink] [raw]
Subject: [PATCH v6 3/3] Documentation: trace: Add documentation for Coresight Dummy Trace

Add documentation for Coresight Dummy Trace under trace/coresight.

Reviewed-by: Bagas Sanjaya <[email protected]>
Signed-off-by: Hao Zhang <[email protected]>
---
.../trace/coresight/coresight-dummy.rst | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
create mode 100644 Documentation/trace/coresight/coresight-dummy.rst

diff --git a/Documentation/trace/coresight/coresight-dummy.rst b/Documentation/trace/coresight/coresight-dummy.rst
new file mode 100644
index 000000000000..eff7c553ee6c
--- /dev/null
+++ b/Documentation/trace/coresight/coresight-dummy.rst
@@ -0,0 +1,32 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=============================
+Coresight Dummy Trace Module
+=============================
+
+ :Author: Hao Zhang <[email protected]>
+ :Date: June 2023
+
+Introduction
+------------
+
+The Coresight dummy trace module is for the specific devices that kernel don't
+have permission to access or configure, e.g., CoreSight TPDMs on Qualcomm
+platforms. For these devices, a dummy driver is needed to register them as
+Coresight devices. The module may also be used to define components that may
+not have any programming interfaces, so that paths can be created in the driver.
+It provides Coresight API for operations on dummy devices, such as enabling and
+disabling them. It also provides the Coresight dummy sink/source paths for
+debugging.
+
+Config details
+--------------
+
+There are two types of nodes, dummy sink and dummy source. These nodes
+are available at ``/sys/bus/coresight/devices``.
+
+Example output::
+
+ $ ls -l /sys/bus/coresight/devices | grep dummy
+ dummy_sink0 -> ../../../devices/platform/soc@0/soc@0:sink/dummy_sink0
+ dummy_source0 -> ../../../devices/platform/soc@0/soc@0:source/dummy_source0
--
2.17.1


2023-06-15 08:37:02

by Suzuki K Poulose

[permalink] [raw]
Subject: Re: [PATCH v6 0/3] Add support to configure Coresight Dummy subunit

On Fri, 2 Jun 2023 16:41:46 +0800, Hao Zhang wrote:
> Introduction of Coresight Dummy subunit
> The Coresight Dummy subunit is for Coresight Dummy component, there are
> some specific Coresight devices that HLOS don't have permission to access.
> Such as some TPDMs, they would be configured in NON-HLOS side, but it's
> necessary to build Coresight path for it to debug. So there need driver to
> register dummy devices as Coresight devices.
>
> [...]

Applied, thanks!

[1/3] Coresight: Add coresight dummy driver
commit: 9d3ba0b6c056918355cf36094d6ed63cdd01a2ab
[2/3] dt-bindings: arm: Add support for Coresight dummy trace
commit: 5911ff4559e45532c1f67257c5731b5e13f5e7a3
[3/3] Documentation: trace: Add documentation for Coresight Dummy Trace
commit: 3b79104f80036231a40ba5d15c3e329985029a0f

Best regards,
--
Suzuki K Poulose <[email protected]>