Commit ff0de066 authored by Yicong Yang's avatar Yicong Yang Committed by Mathieu Poirier
Browse files

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: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20220816114414.4092-3-yangyicong@huawei.com


Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent 24b6c779
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ obj-$(CONFIG_USB4) += thunderbolt/
obj-$(CONFIG_CORESIGHT)		+= hwtracing/coresight/
obj-y				+= hwtracing/intel_th/
obj-$(CONFIG_STM)		+= hwtracing/stm/
obj-$(CONFIG_HISI_PTT)		+= hwtracing/ptt/
obj-y				+= android/
obj-$(CONFIG_NVMEM)		+= nvmem/
obj-$(CONFIG_FPGA)		+= fpga/
+2 −0
Original line number Diff line number Diff line
@@ -5,4 +5,6 @@ source "drivers/hwtracing/stm/Kconfig"

source "drivers/hwtracing/intel_th/Kconfig"

source "drivers/hwtracing/ptt/Kconfig"

endmenu
+12 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
config HISI_PTT
	tristate "HiSilicon PCIe Tune and Trace Device"
	depends on ARM64 || (COMPILE_TEST && 64BIT)
	depends on PCI && HAS_DMA && HAS_IOMEM && PERF_EVENTS
	help
	  HiSilicon PCIe Tune and Trace device exists as a PCIe RCiEP
	  device, and it provides support for PCIe traffic tuning and
	  tracing TLP headers to the memory.

	  This driver can also be built as a module. If so, the module
	  will be called hisi_ptt.
+2 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_HISI_PTT) += hisi_ptt.o
+916 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading