This patch series is to refine the memory barriers for AUX ring buffer.
Patches 01 ~ 04 to address the barriers usage in the kernel. The first
patch is to make clear comment for how to use the barriers between the
data store and aux_head store, this asks the driver to make sure the
data is visible. Patches 02 ~ 04 is to refine the drivers for barriers
after the data store.
Patch 05 is to use WRITE_ONCE() for updating aux_tail.
Patches 06 ~ 09 is to drop the legacy __sync functions, and polish for
duplicate code and cleanup the build and feature test after
SYNC_COMPARE_AND_SWAP is not used.
For easier review and more clear patch organization, comparing against
to the previous patch series, the patches for support compat mode for
AUX trace have been left out and will be sent out as a separate patch
set.
This patch set have been tested on Arm64 Juno platform.
Changes from v4:
- Refined comment for CoreSight ETR/ETF drivers (Suzuki/Peter);
- Changed to use compiler barrier for BTS (mentioned by Peter, but have
not received response from Intel developer);
- Refined the coding style for patch 07 (Adrian).
Changes from v3:
- Removed the inapprocate paragraph in the commit log for patch "perf
auxtrace: Drop legacy __sync functions" (Adrian);
- Added new patch to remove feature-sync-compare-and-swap test (Adrian);
- Th patch for "perf auxtrace: Use WRITE_ONCE() for updating aux_tail",
is a standlone and simple change, so moved it ahead in the patch set
for better ordering;
- Minor improvement for commit logs in the last two patches.
Changes from v2:
- Removed auxtrace_mmap__read_snapshot_head(), which has the duplicated
code with auxtrace_mmap__read_head();
- Cleanuped the build for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT (Adrian);
- Added global variable "kernel_is_64_bit" (Adrian);
- Added compat variants compat_auxtrace_mmap__{read_head|write_tail}
(Adrian).
Leo Yan (9):
perf/ring_buffer: Add comment for barriers on AUX ring buffer
coresight: tmc-etr: Add barrier after updating AUX ring buffer
coresight: tmc-etf: Add comment for store ordering
perf/x86: Add compiler barrier after updating BTS
perf auxtrace: Use WRITE_ONCE() for updating aux_tail
perf auxtrace: Drop legacy __sync functions
perf auxtrace: Remove auxtrace_mmap__read_snapshot_head()
perf: Cleanup for HAVE_SYNC_COMPARE_AND_SWAP_SUPPORT
tools: Remove feature-sync-compare-and-swap feature detection
arch/x86/events/intel/bts.c | 6 ++++
.../hwtracing/coresight/coresight-tmc-etf.c | 5 +++
.../hwtracing/coresight/coresight-tmc-etr.c | 8 +++++
kernel/events/ring_buffer.c | 9 ++++++
tools/build/Makefile.feature | 1 -
tools/build/feature/Makefile | 4 ---
tools/build/feature/test-all.c | 4 ---
.../feature/test-sync-compare-and-swap.c | 15 ---------
tools/perf/Makefile.config | 4 ---
tools/perf/util/auxtrace.c | 18 +++--------
tools/perf/util/auxtrace.h | 31 +------------------
11 files changed, 34 insertions(+), 71 deletions(-)
delete mode 100644 tools/build/feature/test-sync-compare-and-swap.c
--
2.25.1
This patchset add support for SMB(System Memory Buffer) device, SMB
obtains CPU instructions from Coresight ETM device and stores these
messages in system memory.
SMB is developed by Ultrasoc technology, which is acquired by Siemens,
and we still use "Ultrasoc" to name document and driver.
Change since RFC:
- Move ultrasoc driver to drivers/hwtracing/coresight.
- 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):
Documentation: tracing: Documentation for ultrasoc SMB drivers
coresight: ultrasoc: Add System Memory Buffer driver
.../trace/coresight/ultrasoc-trace.rst | 193 +++++
MAINTAINERS | 7 +
drivers/hwtracing/coresight/Kconfig | 3 +
drivers/hwtracing/coresight/Makefile | 2 +
drivers/hwtracing/coresight/ultrasoc/Kconfig | 12 +
drivers/hwtracing/coresight/ultrasoc/Makefile | 6 +
.../coresight/ultrasoc/ultrasoc-smb.c | 722 ++++++++++++++++++
.../coresight/ultrasoc/ultrasoc-smb.h | 142 ++++
8 files changed, 1087 insertions(+)
create mode 100644 Documentation/trace/coresight/ultrasoc-trace.rst
create mode 100644 drivers/hwtracing/coresight/ultrasoc/Kconfig
create mode 100644 drivers/hwtracing/coresight/ultrasoc/Makefile
create mode 100644 drivers/hwtracing/coresight/ultrasoc/ultrasoc-smb.c
create mode 100644 drivers/hwtracing/coresight/ultrasoc/ultrasoc-smb.h
--
2.17.1
This series adds CPU erratum work arounds related to the self-hosted
tracing. The list of affected errata handled in this series are :
* TRBE may overwrite trace in FILL mode
- Arm Neoverse-N2 #2139208
- Cortex-A710 #2119858
* A TSB instruction may not flush the trace completely when executed
in trace prohibited region.
- Arm Neoverse-N2 #2067961
- Cortex-A710 #2054223
The series applies on the self-hosted/trbe fixes posted here [0].
A tree containing both the series is available here [1].
[0] https://lkml.kernel.org/r/20210723124456.3828769-1-suzuki.poulose@arm.com
[1] git@git.gitlab.arm.com:linux-arm/linux-skp.git coresight/errata/trbe-tsb-n2-a710/v1
Suzuki K Poulose (10):
coresight: trbe: Add infrastructure for Errata handling
coresight: trbe: Add a helper to calculate the trace generated
coresight: trbe: Add a helper to pad a given buffer area
coresight: trbe: Decouple buffer base from the hardware base
coresight: trbe: Allow driver to choose a different alignment
arm64: Add Neoverse-N2, Cortex-A710 CPU part definition
arm64: Add erratum detection for TRBE overwrite in FILL mode
coresight: trbe: Workaround TRBE errat overwrite in FILL mode
arm64: Enable workaround for TRBE overwrite in FILL mode
arm64: errata: Add workaround for TSB flush failures
Documentation/arm64/silicon-errata.rst | 8 +
arch/arm64/Kconfig | 70 ++++++
arch/arm64/include/asm/barrier.h | 17 +-
arch/arm64/include/asm/cputype.h | 4 +
arch/arm64/kernel/cpu_errata.c | 44 ++++
arch/arm64/tools/cpucaps | 2 +
drivers/hwtracing/coresight/coresight-trbe.c | 227 ++++++++++++++++---
7 files changed, 341 insertions(+), 31 deletions(-)
--
2.24.1
Changes since v1:
* Re-implement with a new magic number instead of piggybacking on ETMv4
* Improve comments and function name around cs_etm_decoder__get_etmv4_arch_ver()
* Add a warning for unrecognised magic numbers
* Split typo fix into new commit
* Add Leo's reviewed-by tags
* Create a new struct for ETE config (cs_ete_trace_params) instead of re-using ETMv4 config
Applies to perf/core f3c33cbd922
Also available at https://gitlab.arm.com/linux-arm/linux-jc/-/tree/james-ete-v2
James Clark (9):
perf cs-etm: Refactor initialisation of decoder params.
perf cs-etm: Initialise architecture based on TRCIDR1
perf cs-etm: Refactor out ETMv4 header saving
perf cs-etm: Save TRCDEVARCH register
perf cs-etm: Fix typo
perf cs-etm: Update OpenCSD decoder for ETE
perf cs-etm: Create ETE decoder
perf cs-etm: Print the decoder name
perf cs-etm: Show a warning for an unknown magic number
tools/build/feature/test-libopencsd.c | 4 +-
tools/perf/arch/arm/util/cs-etm.c | 97 ++++++++----
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 148 ++++++++----------
.../perf/util/cs-etm-decoder/cs-etm-decoder.h | 13 ++
tools/perf/util/cs-etm.c | 43 ++++-
tools/perf/util/cs-etm.h | 10 ++
6 files changed, 200 insertions(+), 115 deletions(-)
--
2.28.0
Hi Tao,
On Thu, 19 Aug 2021 at 03:29, Tao Zhang <quic_taozha(a)quicinc.com> wrote:
>
> This series adds Coresight support for SM8250 Soc on RB5 board.
> It is composed of two elements.
> a) Add ETM PID for Kryo-5XX.
> b) Add coresight support to DTS for RB5.
>
> This series applies to coresight/next
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
>
> Tao Zhang (2):
> coresight: etm4x: Add ETM PID for Kryo-5XX
> arm64: dts: qcom: sm8250: Add Coresight support
>
> arch/arm64/boot/dts/qcom/qrb5165-rb5.dts | 442 +++++++++++++++++-
> .../coresight/coresight-etm4x-core.c | 1 +
> 2 files changed, 439 insertions(+), 4 deletions(-)
>
I have added your work to my patchset queue. On the other hand I have
a lot of patches to review these days and as such won't be able to
look at it for 4 to 5 weeks.
Thanks,
Mathieu
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
Hi Leo,
We are interested in adding support in Coresight driver to collect trace data at
the time of kernel panic. Would like to know the current status of this
patch series you posted some time back [1]. If no one is working on this,
we would like to revive and resubmit this.
Appreciate your guidance on this.
Also please discard the earlier duplicate emails which i have send to
you by mistake.
Thanks.
1. https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1652258.html.
This patch set is to address the comments in the patch set v1 [1] and
updates the patches.
Changes from v1:
- Added Adrian's review tag for patch 01;
- Refined comment in patch 01 (James);
- Added James' review and test tag for patch 02.
[1] https://lore.kernel.org/patchwork/cover/1473936/
Leo Yan (2):
perf auxtrace: Add compat_auxtrace_mmap__{read_head|write_tail}
perf auxtrace arm: Support
compat_auxtrace_mmap__{read_head|write_tail}
tools/perf/arch/arm/util/auxtrace.c | 32 +++++++++++
tools/perf/util/auxtrace.c | 88 +++++++++++++++++++++++++++--
tools/perf/util/auxtrace.h | 22 +++++++-
3 files changed, 135 insertions(+), 7 deletions(-)
--
2.25.1