Changes since v1:
* Add 3 refactor commits for sysfs reading around pmu.c as suggested
by Arnaldo here [1]
* The dependency on [2] has now reached mainline so is no longer
blocking
* Rebase on perf/core
[1]: https://lore.kernel.org/all/YnqVqq5QW%2Fb14oPZ@kernel.org/
[2]: https://lore.kernel.org/all/20220503123537.1003035-1-german.gomez@arm.com/
German Gomez (4):
perf pmu: Add function to check if a pmu file exists
perf cs_etm: Keep separate symbols for ETMv4 and ETE parameters
perf cs_etm: Record ts_source in AUXTRACE_INFO for ETMv4 and ETE
perf cs_etm: Set the time field in the synthetic samples
James Clark (3):
perf: Remove duplication around EVENT_SOURCE_DEVICE_PATH
perf: Use perf_pmu__open_file() and perf_pmu__scan_file()
perf: Remove remaining duplication of bus/event_source/devices/...
tools/perf/arch/arm/util/auxtrace.c | 5 +-
tools/perf/arch/arm/util/cs-etm.c | 91 +++++++++++-
tools/perf/arch/x86/util/pmu.c | 12 +-
tools/perf/tests/evsel-roundtrip-name.c | 3 +-
tools/perf/tests/parse-events.c | 3 +-
tools/perf/util/cputopo.c | 9 +-
tools/perf/util/cs-etm-base.c | 34 +++--
tools/perf/util/cs-etm.c | 86 +++++++++--
tools/perf/util/cs-etm.h | 13 +-
tools/perf/util/pmu-hybrid.c | 27 +---
tools/perf/util/pmu-hybrid.h | 2 +-
tools/perf/util/pmu.c | 183 ++++++++++--------------
tools/perf/util/pmu.h | 10 +-
13 files changed, 292 insertions(+), 186 deletions(-)
base-commit: 573de010917836f198a4e579d40674991659668b
--
2.25.1
Add support for UltraSoc System Memory Buffer.
Change since v14:
- Add some helpers to the buffer and simplify dumping data according to Jonathan's comment.
- Link: https://lore.kernel.org/lkml/20221123123823.27973-1-hejunhao3@huawei.com/
Change since v13:
- Modify document and the patches description according to Bagas's comment.
- Add dependency on config ACPI, drop redundant enable hw in smb_update_buffer(),
Modify smb_purge_data() description according to Suzuki's comment.
- Link: https://lore.kernel.org/lkml/20221114090316.63157-1-hejunhao3@huawei.com/
Change since v12:
- Modify the code style and add "#ifdef CONFIG_ACPI" according to Jonathan's comment.
- Address the comments from Yicong, included drop "buf_base"__iomem attribute,
modify the "reading" type to bool and fix FIELD_PREP.
- Link: https://lore.kernel.org/lkml/20221109135008.9485-1-hejunhao3@huawei.com/
Change since v11:
- Modify the code style and rename the macro according to Jonathan's comment.
- Link: https://lore.kernel.org/lkml/20221107130624.59886-1-hejunhao3@huawei.com/
Change since v10:
- Rebase onto v6.1-rc4, included similar sysfs register accessors (as same as James's patch)
- Link: https://lore.kernel.org/lkml/20221022115929.7503-1-hejunhao3@huawei.com/
Change since v9:
- Update the Contact tag in SMB document.
- Replace the spinlock with mutex.
- Do some clean-ups in "smb_enable()" and "smb_release()".
- Use classic memory mapped interface.
- Link: https://lore.kernel.org/linux-arm-kernel/20220818132231.28240-1-hejunhao3@h…
Change since v8:
- Insert a blank line at the end of the config tag in Kconfig according to Randy's comment.
- Link: https://lore.kernel.org/linux-arm-kernel/20220816131634.38195-1-hejunhao3@h…
Change since v7:
- Use the macros for register bit flags and numbers of resource.
- Cleanup punctuation.
- Update the Date tag and the KernelVersion tag in the document.
- Link: https://lore.kernel.org/lkml/20220712091353.34540-1-hejunhao3@huawei.com/
Change since v6:
- Modify the code style and driver description according to Suzuki's comment.
- Modify configuration of "drvdata->reading", to void problems in open/read
concurrency scenario.
- Rename the macro of "SMB_FLOW_MASK".
- Use the "handle->head" to determine the page number and offset.
- Link: https://lore.kernel.org/linux-arm-kernel/20220606130223.57354-1-liuqi115@hu…
Change since v5:
- Address the comments from Suzuki, add some comments in SMB document, and modify
configuration of "drvdata->reading", to void problems in multi-core concurrency scenario
- Link: https://lore.kernel.org/linux-arm-kernel/20220416083953.52610-1-liuqi115@hu…
Change since v4:
- Add a simple document of SMB driver according to Suzuki's comment.
- Address the comments from Suzuki.
- Link: https://lore.kernel.org/linux-arm-kernel/20220128061755.31909-1-liuqi115@hu…
Change since v3:
- Modify the file header according to community specifications.
- Address the comments from Mathieu.
- Link: https://lore.kernel.org/linux-arm-kernel/20211118110016.40398-1-liuqi115@hu…
Change since v2:
- Move ultrasoc driver to drivers/hwtracing/coresight by Mathieu's comment.
- Link: https://lists.linaro.org/pipermail/coresight/2021-November/007310.html
Change since v1:
- Drop the document of UltraSoc according to Mathieu's comment.
- Add comments to explain some private hardware settings.
- Address the comments from Mathieu.
- Link: https://lists.linaro.org/pipermail/coresight/2021-August/006842.html
Change since RFC:
- Move driver to drivers/hwtracing/coresight/ultrasoc.
- Remove ultrasoc-axi-com.c, as AXI-COM doesn't need to be configured in
basic tracing function.
- Remove ultrasoc.c as SMB does not need to register with the ultrasoc core.
- Address the comments from Mathieu and Suzuki.
- Link: https://lists.linaro.org/pipermail/coresight/2021-June/006535.html
Qi Liu (2):
drivers/coresight: Add UltraSoc System Memory Buffer driver
Documentation: Add document for UltraSoc SMB driver
.../sysfs-bus-coresight-devices-ultra_smb | 31 +
.../trace/coresight/ultrasoc-smb.rst | 83 +++
drivers/hwtracing/coresight/Kconfig | 12 +
drivers/hwtracing/coresight/Makefile | 1 +
drivers/hwtracing/coresight/ultrasoc-smb.c | 648 ++++++++++++++++++
drivers/hwtracing/coresight/ultrasoc-smb.h | 125 ++++
6 files changed, 900 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-ultra_smb
create mode 100644 Documentation/trace/coresight/ultrasoc-smb.rst
create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.c
create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.h
--
2.33.0
Hi James & Mike,
With this patch "[PATCH] coresight: cti: Fix hang in cti_disable_hw()",
runtime PM calls are removed in cti_enable_hw/cti_disable_hw.
There will be register access issue when write 1 to enable sysfs node of
CTI directly as clock is not enabled for accessing CTI registers.
echo 1 > cti0/enable
static ssize_t enable_store(struct device *dev, struct device_attribute
*attr, const char *buf, size_t size)
Is there fix for the enable_store case ?
Thanks
Jinlong Mao
This set extends the configfs support to allow loading and unloading of
configurations as binary files via configfs.
Additional attributes - load and unload are provided to in the
/config/cs-syscfg subsytem base group to implement the load functionality.
Routines to generate binary configuration files are supplied in
./tools/coresight.
Example generator and reader applications are provided.
Tools may be cross compiled or built for use on host system.
Documentation is updated to describe feature usage.
Changes since v4:
1) Update coresight/next - 6.1-rc3
2) Update to lockdep fixes to avoid read lock race in configfs.
Changes since v3:
1) Rebase & tested on coresight/next - 5.19-rc3 - which includes the
fix patch for earlier configfs works.
2) Lockdep investigations resulted in re-design of some of the code
accessing configfs.
3) moved load and unload attributes to root of cs-syscfg. (Mathieu)
4) Additional minor fixes suggested by Mathieu.
5) Memory for configfs loaded and unloaded configurations is now
explicitly freed.
6) LOCKDEP nesting fix for configfs base code (fs/configfs/dir.c)
Changes since v2:
1) Rebased & tested on coresight/next - 5.18-rc2
2) Moved coresight config generator and reader programs from samples to
tools/coresight. Docs updated to match. (suggested by Mathieu)
3) userspace builds now use userspace headers from tools/...
4) Other minor fixes from Mathieu's review.
Changes since v1:
1) Rebased to coresight/next - 5.16-rc1 with previous coresight config
set applied.
2) Makefile.host fixed to default to all target.
Mike Leach (6):
coresight: configfs: Update memory allocation / free for configfs
elements
coresight: configfs: Add in functionality for load via configfs
coresight: configfs: Add in binary attributes to load files
coresight: configfs: Modify config files to allow userspace use
coresight: tools: Add config file write and reader tools
Documentation: coresight: docs for config load via configfs
.../trace/coresight/coresight-config.rst | 202 +++++-
MAINTAINERS | 1 +
drivers/hwtracing/coresight/Makefile | 2 +-
.../coresight/coresight-config-file.c | 583 ++++++++++++++++++
.../coresight/coresight-config-file.h | 139 +++++
.../hwtracing/coresight/coresight-config.h | 27 +
.../coresight/coresight-syscfg-configfs.c | 361 +++++++++--
.../coresight/coresight-syscfg-configfs.h | 4 +
.../hwtracing/coresight/coresight-syscfg.c | 137 +++-
.../hwtracing/coresight/coresight-syscfg.h | 6 +-
tools/coresight/Makefile | 52 ++
tools/coresight/coresight-cfg-bufw.c | 309 ++++++++++
tools/coresight/coresight-cfg-bufw.h | 26 +
tools/coresight/coresight-cfg-example1.c | 62 ++
tools/coresight/coresight-cfg-example2.c | 95 +++
tools/coresight/coresight-cfg-examples.h | 22 +
tools/coresight/coresight-cfg-file-gen.c | 61 ++
tools/coresight/coresight-cfg-file-read.c | 227 +++++++
tools/coresight/coresight-config-uapi.h | 76 +++
19 files changed, 2339 insertions(+), 53 deletions(-)
create mode 100644 drivers/hwtracing/coresight/coresight-config-file.c
create mode 100644 drivers/hwtracing/coresight/coresight-config-file.h
create mode 100644 tools/coresight/Makefile
create mode 100644 tools/coresight/coresight-cfg-bufw.c
create mode 100644 tools/coresight/coresight-cfg-bufw.h
create mode 100644 tools/coresight/coresight-cfg-example1.c
create mode 100644 tools/coresight/coresight-cfg-example2.c
create mode 100644 tools/coresight/coresight-cfg-examples.h
create mode 100644 tools/coresight/coresight-cfg-file-gen.c
create mode 100644 tools/coresight/coresight-cfg-file-read.c
create mode 100644 tools/coresight/coresight-config-uapi.h
--
2.17.1
Add support for UltraSoc System Memory Buffer.
Change since v13:
- Modify document and the patches description according to Bagas's comment.
- Add dependency on config ACPI, drop redundant enable hw in smb_update_buffer(),
Modify smb_purge_data() description according to Suzuki's comment.
- Link: https://lore.kernel.org/lkml/20221114090316.63157-1-hejunhao3@huawei.com/
Change since v12:
- Modify the code style and add "#ifdef CONFIG_ACPI" according to Jonathan's comment.
- Address the comments from Yicong, included drop "buf_base"__iomem attribute,
modify the "reading" type to bool and fix FIELD_PREP.
- Link: https://lore.kernel.org/lkml/20221109135008.9485-1-hejunhao3@huawei.com/
Change since v11:
- Modify the code style and rename the macro according to Jonathan's comment.
- Link: https://lore.kernel.org/lkml/20221107130624.59886-1-hejunhao3@huawei.com/
Change since v10:
- Rebase onto v6.1-rc4, included similar sysfs register accessors (as same as James's patch)
- Link: https://lore.kernel.org/lkml/20221022115929.7503-1-hejunhao3@huawei.com/
Change since v9:
- Update the Contact tag in SMB document.
- Replace the spinlock with mutex.
- Do some clean-ups in "smb_enable()" and "smb_release()".
- Use classic memory mapped interface.
- Link: https://lore.kernel.org/linux-arm-kernel/20220818132231.28240-1-hejunhao3@h…
Change since v8:
- Insert a blank line at the end of the config tag in Kconfig according to Randy's comment.
- Link: https://lore.kernel.org/linux-arm-kernel/20220816131634.38195-1-hejunhao3@h…
Change since v7:
- Use the macros for register bit flags and numbers of resource.
- Cleanup punctuation.
- Update the Date tag and the KernelVersion tag in the document.
- Link: https://lore.kernel.org/lkml/20220712091353.34540-1-hejunhao3@huawei.com/
Change since v6:
- Modify the code style and driver description according to Suzuki's comment.
- Modify configuration of "drvdata->reading", to void problems in open/read
concurrency scenario.
- Rename the macro of "SMB_FLOW_MASK".
- Use the "handle->head" to determine the page number and offset.
- Link: https://lore.kernel.org/linux-arm-kernel/20220606130223.57354-1-liuqi115@hu…
Change since v5:
- Address the comments from Suzuki, add some comments in SMB document, and modify
configuration of "drvdata->reading", to void problems in multi-core concurrency scenario
- Link: https://lore.kernel.org/linux-arm-kernel/20220416083953.52610-1-liuqi115@hu…
Change since v4:
- Add a simple document of SMB driver according to Suzuki's comment.
- Address the comments from Suzuki.
- Link: https://lore.kernel.org/linux-arm-kernel/20220128061755.31909-1-liuqi115@hu…
Change since v3:
- Modify the file header according to community specifications.
- Address the comments from Mathieu.
- Link: https://lore.kernel.org/linux-arm-kernel/20211118110016.40398-1-liuqi115@hu…
Change since v2:
- Move ultrasoc driver to drivers/hwtracing/coresight by Mathieu's comment.
- Link: https://lists.linaro.org/pipermail/coresight/2021-November/007310.html
Change since v1:
- Drop the document of UltraSoc according to Mathieu's comment.
- Add comments to explain some private hardware settings.
- Address the comments from Mathieu.
- Link: https://lists.linaro.org/pipermail/coresight/2021-August/006842.html
Change since RFC:
- Move driver to drivers/hwtracing/coresight/ultrasoc.
- Remove ultrasoc-axi-com.c, as AXI-COM doesn't need to be configured in
basic tracing function.
- Remove ultrasoc.c as SMB does not need to register with the ultrasoc core.
- Address the comments from Mathieu and Suzuki.
- Link: https://lists.linaro.org/pipermail/coresight/2021-June/006535.html
Qi Liu (2):
drivers/coresight: Add UltraSoc System Memory Buffer driver
Documentation: Add document for UltraSoc SMB driver
.../sysfs-bus-coresight-devices-ultra_smb | 31 +
.../trace/coresight/ultrasoc-smb.rst | 83 +++
drivers/hwtracing/coresight/Kconfig | 12 +
drivers/hwtracing/coresight/Makefile | 1 +
drivers/hwtracing/coresight/ultrasoc-smb.c | 658 ++++++++++++++++++
drivers/hwtracing/coresight/ultrasoc-smb.h | 129 ++++
6 files changed, 914 insertions(+)
create mode 100644 Documentation/ABI/testing/sysfs-bus-coresight-devices-ultra_smb
create mode 100644 Documentation/trace/coresight/ultrasoc-smb.rst
create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.c
create mode 100644 drivers/hwtracing/coresight/ultrasoc-smb.h
--
2.33.0
The auxtrace info header can be useful for debugging, and at the
moment it's possible to record a file without OpenCSD linked but
not view the header even though it should be possible to do.
This patchset tidies up some of the related functions and
improves some of the error messages before making the above
possible in the last commit.
Testing done:
* Compiled on x86 and Arm both with and without CORESIGHT=1
* Ran the Coresight tests
Applies to perf/core (0c3852adae8)
James Clark (5):
perf: cs-etm: Print unknown header version as an error
perf: cs-etm: Remove unused stub methods
perf: cs-etm: Tidy up auxtrace info header printing
perf: cs-etm: Cleanup cs_etm__process_auxtrace_info()
perf: cs-etm: Print auxtrace info even if OpenCSD isn't linked
tools/perf/util/Build | 1 +
tools/perf/util/cs-etm-base.c | 174 ++++++++++++++++++++++++++++
tools/perf/util/cs-etm.c | 208 +++-------------------------------
tools/perf/util/cs-etm.h | 46 ++------
4 files changed, 200 insertions(+), 229 deletions(-)
create mode 100644 tools/perf/util/cs-etm-base.c
--
2.25.1
Hi Greg,
Please find the updated pull request with coresight updates to v6.2.
Kindly consider pulling.
Changes:
- Fix empty lines around "Fixes" tag in the CTI Fix.
Thanks
Suzuki
The following changes since commit 30a0b95b1335e12efef89dd78518ed3e4a71a763:
Linux 6.1-rc3 (2022-10-30 15:19:28 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git tags/coresight-next-v6.2
for you to fetch changes up to c767c34740132ffc478226864a7461493cdc2413:
coresight: etm4x: fix repeated words in comments (2022-11-28 18:29:53 +0000)
----------------------------------------------------------------
coresight: Update for v6.2
CoreSight updatesfor v6.2 includes :
- Support for ETMv4 probing on hotplugged CPUs
- Fix TRBE driver for cpuhp state refcounting
- Fix CTI driver NULL pointer dereferencing
- Fix comment for repeated word
Signed-off-by: Suzuki K Poulose <suzuki.poulose(a)arm.com>
----------------------------------------------------------------
Jilin Yuan (1):
coresight: etm4x: fix repeated words in comments
Mike Leach (1):
coresight: cti: Fix null pointer error on CTI init before ETM
Tamas Zsoldos (1):
coresight: etm4x: add CPU hotplug support for probing
Yang Shen (1):
coresight: trbe: remove cpuhp instance node before remove cpuhp state
drivers/hwtracing/coresight/coresight-cti-core.c | 2 +-
drivers/hwtracing/coresight/coresight-etm4x-core.c | 155 +++++++++++++++------
drivers/hwtracing/coresight/coresight-trbe.c | 1 +
3 files changed, 116 insertions(+), 42 deletions(-)
Hi Greg
On 28/11/2022 18:17, Greg KH wrote:
> On Mon, Nov 28, 2022 at 03:17:35PM +0000, Suzuki K Poulose wrote:
>> Hi Greg,
>>
>> Please find the coresight updates for Linux v6.2. Kindly consider pulling.
>>
>> Suzuki
>>
>>
>> The following changes since commit 30a0b95b1335e12efef89dd78518ed3e4a71a763:
>>
>> Linux 6.1-rc3 (2022-10-30 15:19:28 -0700)
>>
>> are available in the Git repository at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git tags/coresight-next-v6.2
>
> I get the following error when trying to push this out:
>
> Commit: bd7e9cef2137 ("coresight: cti: Fix null pointer error on CTI init before ETM")
> Fixes tag: Fixes: 23722fb46725 ("coresight: Fix possible deadlock with lock dependency")
> Has these problem(s):
> - empty lines surround the Fixes tag
Apologies. Will fix it. Is there a way to detect these issues at my end
to avoid these issues ? I would be happy to improve the filtering at my
side to save your cycles.
Thanks
Suzuki
>
> Please fix up and resend.
>
> thanks,
>
> greg k-h
Hi Greg,
Please find the coresight updates for Linux v6.2. Kindly consider pulling.
Suzuki
The following changes since commit 30a0b95b1335e12efef89dd78518ed3e4a71a763:
Linux 6.1-rc3 (2022-10-30 15:19:28 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/coresight/linux.git tags/coresight-next-v6.2
for you to fetch changes up to 4ce71fdc8325936fd0d9ee819b8b18e1fc09bb2e:
coresight: etm4x: fix repeated words in comments (2022-11-28 14:56:50 +0000)
----------------------------------------------------------------
coresight: Update for v6.2
CoreSight updatesfor v6.2 includes :
- Support for ETMv4 probing on hotplugged CPUs
- Fix TRBE driver for cpuhp state refcounting
- Fix CTI driver NULL pointer dereferencing
- Fix comment for repeated word
Signed-off-by: Suzuki K Poulose <suzuki.poulose(a)arm.com>
----------------------------------------------------------------
Jilin Yuan (1):
coresight: etm4x: fix repeated words in comments
Mike Leach (1):
coresight: cti: Fix null pointer error on CTI init before ETM
Tamas Zsoldos (1):
coresight: etm4x: add CPU hotplug support for probing
Yang Shen (1):
coresight: trbe: remove cpuhp instance node before remove cpuhp state
drivers/hwtracing/coresight/coresight-cti-core.c | 2 +-
drivers/hwtracing/coresight/coresight-etm4x-core.c | 155 +++++++++++++++------
drivers/hwtracing/coresight/coresight-trbe.c | 1 +
3 files changed, 116 insertions(+), 42 deletions(-)