drivers/perf: hisi: Add support for HiSilicon PA PMU driver
authorShaokun Zhang <zhangshaokun@hisilicon.com>
Mon, 8 Mar 2021 06:50:36 +0000 (14:50 +0800)
committerWill Deacon <will@kernel.org>
Thu, 25 Mar 2021 13:03:46 +0000 (13:03 +0000)
commita0ab25cd82eeb68bfa19a4d93a097521af5011b8
treea8913fbe7d9341684d72d6411cbaaa2ab40b3e99
parent3bf30882c3c7b6e376d9d6d04082c9aa2d2ac30a
drivers/perf: hisi: Add support for HiSilicon PA PMU driver

On HiSilicon Hip09 platform, there is a PA (Protocol Adapter) module on
each chip SICL (Super I/O Cluster) which incorporates three Hydra interface
and facilitates the cache coherency between the dies on the chip. While PA
uncore PMU model is the same as other Hip09 PMU modules and many PMU events
are supported. Let's support the PMU driver using the HiSilicon uncore PMU
framework.

PA PMU supports the following filter functions:
* tracetag_en: allows user to count events according to tt_req or
tt_core set in L3C PMU. It's the same as other PMUs.

* srcid_cmd & srcid_msk: allows user to filter statistics that come from
specific CCL/ICL by configuration source ID.

* tgtid_cmd & tgtid_msk: it is the similar function to srcid_cmd &
srcid_msk. Both are used to check where the data comes from or go to.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Co-developed-by: Qi Liu <liuqi115@huawei.com>
Signed-off-by: Qi Liu <liuqi115@huawei.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Link: https://lore.kernel.org/r/1615186237-22263-9-git-send-email-zhangshaokun@hisilicon.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/hisilicon/Makefile
drivers/perf/hisilicon/hisi_uncore_pa_pmu.c [new file with mode: 0644]
include/linux/cpuhotplug.h