mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 02:46:47 +07:00
724142f8c4
This patch adds support for performance reporting private feature for FPGA Management Engine (FME). Now it supports several different performance counters, including 'basic', 'cache', 'fabric', 'vtd' and 'vtd_sip'. It allows user to use standard linux tools to access these performance counters. e.g. List all events by "perf list" perf list | grep fme dfl_fme0/cache_read_hit/ [Kernel PMU event] dfl_fme0/cache_read_miss/ [Kernel PMU event] ... dfl_fme0/fab_mmio_read/ [Kernel PMU event] dfl_fme0/fab_mmio_write/ [Kernel PMU event] ... dfl_fme0/fab_port_mmio_read,portid=?/ [Kernel PMU event] dfl_fme0/fab_port_mmio_write,portid=?/ [Kernel PMU event] ... dfl_fme0/vtd_port_devtlb_1g_fill,portid=?/ [Kernel PMU event] dfl_fme0/vtd_port_devtlb_2m_fill,portid=?/ [Kernel PMU event] ... dfl_fme0/vtd_sip_iotlb_1g_hit/ [Kernel PMU event] dfl_fme0/vtd_sip_iotlb_1g_miss/ [Kernel PMU event] ... dfl_fme0/clock [Kernel PMU event] ... e.g. check increased counter value after run one application using "perf stat" command. perf stat -e dfl_fme0/fab_mmio_read/,dfl_fme0/fab_mmio_write/ ./test Performance counter stats for './test': 1 dfl_fme0/fab_mmio_read/ 2 dfl_fme0/fab_mmio_write/ 1.009496520 seconds time elapsed Please note that fabric counters support both fab_* and fab_port_*, but actually they are sharing one set of performance counters in hardware. If user wants to monitor overall data events on fab_* then fab_port_* can't be supported at the same time, see example below: perf stat -e dfl_fme0/fab_mmio_read/,dfl_fme0/fab_port_mmio_write,portid=0/ Performance counter stats for 'system wide': 0 dfl_fme0/fab_mmio_read/ <not supported> dfl_fme0/fab_port_mmio_write,portid=0/ 2.141064085 seconds time elapsed Signed-off-by: Luwei Kang <luwei.kang@intel.com> Signed-off-by: Xu Yilun <yilun.xu@intel.com> Signed-off-by: Wu Hao <hao.wu@intel.com> Link: https://lore.kernel.org/r/1587949583-12058-3-git-send-email-hao.wu@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
49 lines
1.8 KiB
Makefile
49 lines
1.8 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for the fpga framework and fpga manager drivers.
|
|
#
|
|
|
|
# Core FPGA Manager Framework
|
|
obj-$(CONFIG_FPGA) += fpga-mgr.o
|
|
|
|
# FPGA Manager Drivers
|
|
obj-$(CONFIG_FPGA_MGR_ALTERA_CVP) += altera-cvp.o
|
|
obj-$(CONFIG_FPGA_MGR_ALTERA_PS_SPI) += altera-ps-spi.o
|
|
obj-$(CONFIG_FPGA_MGR_ICE40_SPI) += ice40-spi.o
|
|
obj-$(CONFIG_FPGA_MGR_MACHXO2_SPI) += machxo2-spi.o
|
|
obj-$(CONFIG_FPGA_MGR_SOCFPGA) += socfpga.o
|
|
obj-$(CONFIG_FPGA_MGR_SOCFPGA_A10) += socfpga-a10.o
|
|
obj-$(CONFIG_FPGA_MGR_STRATIX10_SOC) += stratix10-soc.o
|
|
obj-$(CONFIG_FPGA_MGR_TS73XX) += ts73xx-fpga.o
|
|
obj-$(CONFIG_FPGA_MGR_XILINX_SPI) += xilinx-spi.o
|
|
obj-$(CONFIG_FPGA_MGR_ZYNQ_FPGA) += zynq-fpga.o
|
|
obj-$(CONFIG_FPGA_MGR_ZYNQMP_FPGA) += zynqmp-fpga.o
|
|
obj-$(CONFIG_ALTERA_PR_IP_CORE) += altera-pr-ip-core.o
|
|
obj-$(CONFIG_ALTERA_PR_IP_CORE_PLAT) += altera-pr-ip-core-plat.o
|
|
|
|
# FPGA Bridge Drivers
|
|
obj-$(CONFIG_FPGA_BRIDGE) += fpga-bridge.o
|
|
obj-$(CONFIG_SOCFPGA_FPGA_BRIDGE) += altera-hps2fpga.o altera-fpga2sdram.o
|
|
obj-$(CONFIG_ALTERA_FREEZE_BRIDGE) += altera-freeze-bridge.o
|
|
obj-$(CONFIG_XILINX_PR_DECOUPLER) += xilinx-pr-decoupler.o
|
|
|
|
# High Level Interfaces
|
|
obj-$(CONFIG_FPGA_REGION) += fpga-region.o
|
|
obj-$(CONFIG_OF_FPGA_REGION) += of-fpga-region.o
|
|
|
|
# FPGA Device Feature List Support
|
|
obj-$(CONFIG_FPGA_DFL) += dfl.o
|
|
obj-$(CONFIG_FPGA_DFL_FME) += dfl-fme.o
|
|
obj-$(CONFIG_FPGA_DFL_FME_MGR) += dfl-fme-mgr.o
|
|
obj-$(CONFIG_FPGA_DFL_FME_BRIDGE) += dfl-fme-br.o
|
|
obj-$(CONFIG_FPGA_DFL_FME_REGION) += dfl-fme-region.o
|
|
obj-$(CONFIG_FPGA_DFL_AFU) += dfl-afu.o
|
|
|
|
dfl-fme-objs := dfl-fme-main.o dfl-fme-pr.o dfl-fme-error.o
|
|
dfl-fme-objs += dfl-fme-perf.o
|
|
dfl-afu-objs := dfl-afu-main.o dfl-afu-region.o dfl-afu-dma-region.o
|
|
dfl-afu-objs += dfl-afu-error.o
|
|
|
|
# Drivers for FPGAs which implement DFL
|
|
obj-$(CONFIG_FPGA_DFL_PCI) += dfl-pci.o
|