All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] Add support for HiSilicon PCIe Tune and Trace device
@ 2021-11-16  9:06 ` Yicong Yang
  0 siblings, 0 replies; 69+ messages in thread
From: Yicong Yang @ 2021-11-16  9:06 UTC (permalink / raw)
  To: gregkh, helgaas, alexander.shishkin, lorenzo.pieralisi, will,
	mark.rutland, mathieu.poirier, suzuki.poulose, mike.leach,
	leo.yan, jonathan.cameron, daniel.thompson, joro, john.garry,
	shameerali.kolothum.thodi, linux-kernel, linux-arm-kernel,
	coresight, linux-pci, linux-perf-users, iommu
  Cc: prime.zeng, liuqi115, zhangshaokun, linuxarm, yangyicong, song.bao.hua

HiSilicon PCIe tune and trace device (PTT) is a PCIe Root Complex
integrated Endpoint (RCiEP) device, providing the capability
to dynamically monitor and tune the PCIe traffic (tune),
and trace the TLP headers (trace).

PTT tune is designed for monitoring and adjusting PCIe link parameters.
We provide several parameters of the PCIe link. Through the driver,
user can adjust the value of certain parameter to affect the PCIe link
for the purpose of enhancing the performance in certian situation.

PTT trace is designed for dumping the TLP headers to the memory, which
can be used to analyze the transactions and usage condition of the PCIe
Link. Users can choose filters to trace headers, by either requester
ID, or those downstream of a set of Root Ports on the same core of the
PTT device. It's also supported to trace the headers of certain type and
of certain direction.

The driver registers a PMU device for each PTT device. The trace can
be used through `perf record` and the traced headers can be decoded
by `perf report`. The perf command support for the device is also
added in this patchset. The tune can be used through the sysfs
attributes of related PMU device. See the documentation for the
detailed usage.

Change since v1:
- switch the user interface of trace to perf from debugfs
- switch the user interface of tune to sysfs from debugfs
- add perf tool support to start trace and decode the trace data
- address the comments of documentation from Bjorn
- add RMR[1] support of the device as trace works in RMR mode or
  direct DMA mode. RMR support is achieved by common APIs rather
  than the APIs implemented in [1].
Link: https://lore.kernel.org/lkml/1618654631-42454-1-git-send-email-yangyicong@hisilicon.com/

[1] https://lore.kernel.org/linux-acpi/20210805080724.480-1-shameerali.kolothum.thodi@huawei.com/

Qi Liu (1):
  perf tool: Add support for HiSilicon PCIe Tune and Trace device driver

Yicong Yang (5):
  iommu: Export iommu_{get,put}_resv_regions()
  hwtracing: Add trace function support for HiSilicon PCIe Tune and
    Trace device
  hwtracing: Add tune function support for HiSilicon PCIe Tune and Trace
    device
  docs: Add HiSilicon PTT device driver documentation
  MAINTAINERS: Add maintainer for HiSilicon PTT driver

 Documentation/trace/hisi-ptt.rst              |  305 ++++
 MAINTAINERS                                   |    7 +
 drivers/Makefile                              |    1 +
 drivers/hwtracing/Kconfig                     |    2 +
 drivers/hwtracing/hisilicon/Kconfig           |    8 +
 drivers/hwtracing/hisilicon/Makefile          |    2 +
 drivers/hwtracing/hisilicon/hisi_ptt.c        | 1313 +++++++++++++++++
 drivers/iommu/iommu.c                         |    2 +
 include/linux/iommu.h                         |    4 +-
 tools/perf/arch/arm/util/auxtrace.c           |   56 +-
 tools/perf/arch/arm/util/pmu.c                |    3 +
 tools/perf/arch/arm64/util/Build              |    2 +-
 tools/perf/arch/arm64/util/hisi_ptt.c         |  195 +++
 tools/perf/util/Build                         |    2 +
 tools/perf/util/auxtrace.c                    |    4 +
 tools/perf/util/auxtrace.h                    |    1 +
 tools/perf/util/hisi-ptt-decoder/Build        |    1 +
 .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.c   |  170 +++
 .../hisi-ptt-decoder/hisi-ptt-pkt-decoder.h   |   28 +
 tools/perf/util/hisi_ptt.c                    |  228 +++
 tools/perf/util/hisi_ptt.h                    |   28 +
 21 files changed, 2356 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/trace/hisi-ptt.rst
 create mode 100644 drivers/hwtracing/hisilicon/Kconfig
 create mode 100644 drivers/hwtracing/hisilicon/Makefile
 create mode 100644 drivers/hwtracing/hisilicon/hisi_ptt.c
 create mode 100644 tools/perf/arch/arm64/util/hisi_ptt.c
 create mode 100644 tools/perf/util/hisi-ptt-decoder/Build
 create mode 100644 tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.c
 create mode 100644 tools/perf/util/hisi-ptt-decoder/hisi-ptt-pkt-decoder.h
 create mode 100644 tools/perf/util/hisi_ptt.c
 create mode 100644 tools/perf/util/hisi_ptt.h

-- 
2.33.0


^ permalink raw reply	[flat|nested] 69+ messages in thread

end of thread, other threads:[~2021-12-09 13:22 UTC | newest]

Thread overview: 69+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16  9:06 [PATCH v2 0/6] Add support for HiSilicon PCIe Tune and Trace device Yicong Yang
2021-11-16  9:06 ` Yicong Yang via iommu
2021-11-16  9:06 ` Yicong Yang
2021-11-16  9:06 ` [PATCH v2 1/6] iommu: Export iommu_{get,put}_resv_regions() Yicong Yang
2021-11-16  9:06   ` Yicong Yang via iommu
2021-11-16  9:06   ` Yicong Yang
2021-11-24 17:51   ` Mathieu Poirier
2021-11-24 17:51     ` Mathieu Poirier
2021-11-24 17:51     ` Mathieu Poirier
2021-12-06 11:56   ` Joerg Roedel
2021-12-06 11:56     ` Joerg Roedel
2021-12-06 11:56     ` Joerg Roedel
2021-12-06 12:56     ` Yicong Yang
2021-12-06 12:56       ` Yicong Yang
2021-12-06 12:56       ` Yicong Yang via iommu
2021-11-16  9:06 ` [PATCH v2 2/6] hwtracing: Add trace function support for HiSilicon PCIe Tune and Trace device Yicong Yang
2021-11-16  9:06   ` Yicong Yang via iommu
2021-11-16  9:06   ` Yicong Yang
2021-11-16 10:56   ` Robin Murphy
2021-11-16 10:56     ` Robin Murphy
2021-11-16 10:56     ` Robin Murphy
2021-11-16 11:37     ` Yicong Yang
2021-11-16 11:37       ` Yicong Yang via iommu
2021-11-16 11:37       ` Yicong Yang
2021-11-18  9:01       ` Yicong Yang
2021-11-18  9:01         ` Yicong Yang
2021-11-18  9:01         ` Yicong Yang via iommu
2021-11-25 15:49         ` Robin Murphy
2021-11-25 15:49           ` Robin Murphy
2021-11-25 15:49           ` Robin Murphy
2021-11-29  8:22           ` Yicong Yang via iommu
2021-11-29  8:22             ` Yicong Yang
2021-11-29  8:22             ` Yicong Yang
2021-12-07 16:31             ` Robin Murphy
2021-12-07 16:31               ` Robin Murphy
2021-12-07 16:31               ` Robin Murphy
2021-12-09 13:19               ` Yicong Yang
2021-12-09 13:19                 ` Yicong Yang
2021-12-09 13:19                 ` Yicong Yang via iommu
2021-11-24 18:51   ` Mathieu Poirier
2021-11-24 18:51     ` Mathieu Poirier
2021-11-24 18:51     ` Mathieu Poirier
2021-11-25  8:39     ` Yicong Yang via iommu
2021-11-25  8:39       ` Yicong Yang
2021-11-25  8:39       ` Yicong Yang
2021-11-25 18:50       ` Mathieu Poirier
2021-11-25 18:50         ` Mathieu Poirier
2021-11-25 18:50         ` Mathieu Poirier
2021-11-26 17:10         ` Mathieu Poirier
2021-11-26 17:10           ` Mathieu Poirier
2021-11-26 17:10           ` Mathieu Poirier
2021-11-29  8:59           ` Yicong Yang via iommu
2021-11-29  8:59             ` Yicong Yang
2021-11-29  8:59             ` Yicong Yang
2021-11-29  8:45         ` Yicong Yang via iommu
2021-11-29  8:45           ` Yicong Yang
2021-11-29  8:45           ` Yicong Yang
2021-11-16  9:06 ` [PATCH v2 3/6] hwtracing: Add tune " Yicong Yang
2021-11-16  9:06   ` Yicong Yang via iommu
2021-11-16  9:06   ` Yicong Yang
2021-11-16  9:06 ` [PATCH v2 4/6] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver Yicong Yang
2021-11-16  9:06   ` Yicong Yang via iommu
2021-11-16  9:06   ` Yicong Yang
2021-11-16  9:06 ` [PATCH v2 5/6] docs: Add HiSilicon PTT device driver documentation Yicong Yang
2021-11-16  9:06   ` Yicong Yang via iommu
2021-11-16  9:06   ` Yicong Yang
2021-11-16  9:06 ` [PATCH v2 6/6] MAINTAINERS: Add maintainer for HiSilicon PTT driver Yicong Yang
2021-11-16  9:06   ` Yicong Yang via iommu
2021-11-16  9:06   ` Yicong Yang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.