]> git.baikalelectronics.ru Git - kernel.git/commit
hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace...
authorYicong Yang <yangyicong@hisilicon.com>
Tue, 16 Aug 2022 11:44:11 +0000 (19:44 +0800)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Thu, 8 Sep 2022 22:26:17 +0000 (16:26 -0600)
commit2caa1e7dcf1056e9246adbff9e35542b02a2b568
treeab4b93c5f8cd2a85fa4112fe0edb94be6dc771c7
parent63a69acc28a5ee1d9a476acc9941c9951cb76271
hwtracing: hisi_ptt: Add trace function support for HiSilicon PCIe Tune and Trace device

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 and trace the TLP headers.

Add the driver for the device to enable the trace function. Register PMU
device of PTT trace, then users can use trace through perf command. The
driver makes use of perf AUX trace function and support the following
events to configure the trace:

- filter: select Root port or Endpoint to trace
- type: select the type of traced TLP headers
- direction: select the direction of traced TLP headers
- format: select the data format of the traced TLP headers

This patch initially add basic trace support of PTT device.

Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20220816114414.4092-3-yangyicong@huawei.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/Makefile
drivers/hwtracing/Kconfig
drivers/hwtracing/ptt/Kconfig [new file with mode: 0644]
drivers/hwtracing/ptt/Makefile [new file with mode: 0644]
drivers/hwtracing/ptt/hisi_ptt.c [new file with mode: 0644]
drivers/hwtracing/ptt/hisi_ptt.h [new file with mode: 0644]