]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drivers/perf: hisi: Extend the field of tt_core
authorYicong Yang <yangyicong@hisilicon.com>
Fri, 29 Aug 2025 10:14:23 +0000 (18:14 +0800)
committerWill Deacon <will@kernel.org>
Mon, 22 Sep 2025 12:14:37 +0000 (13:14 +0100)
Currently the tt_core's using config1's bit [7, 0] and can not be
extended. For some platforms there's more the 8 CPUs sharing the
L3 cache. So make tt_core use config2's bit [15, 0] and the remaining
bits in config2 is reserved for extension.

Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Yushan Wang <wangyushan12@huawei.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/hisilicon/hisi_uncore_l3c_pmu.c

index a372dd2c07b5de5dba8c91d5e94f801bac99c4cf..39444f11cbad3a8ebf0eb06f0934757485b1be7e 100644 (file)
 #define L3C_V1_NR_EVENTS       0x59
 #define L3C_V2_NR_EVENTS       0xFF
 
-HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_core, config1, 7, 0);
 HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_req, config1, 10, 8);
 HISI_PMU_EVENT_ATTR_EXTRACTOR(datasrc_cfg, config1, 15, 11);
 HISI_PMU_EVENT_ATTR_EXTRACTOR(datasrc_skt, config1, 16, 16);
+HISI_PMU_EVENT_ATTR_EXTRACTOR(tt_core, config2, 15, 0);
 
 static void hisi_l3c_pmu_config_req_tracetag(struct perf_event *event)
 {
@@ -397,7 +397,7 @@ static const struct attribute_group hisi_l3c_pmu_v1_format_group = {
 
 static struct attribute *hisi_l3c_pmu_v2_format_attr[] = {
        HISI_PMU_FORMAT_ATTR(event, "config:0-7"),
-       HISI_PMU_FORMAT_ATTR(tt_core, "config1:0-7"),
+       HISI_PMU_FORMAT_ATTR(tt_core, "config2:0-15"),
        HISI_PMU_FORMAT_ATTR(tt_req, "config1:8-10"),
        HISI_PMU_FORMAT_ATTR(datasrc_cfg, "config1:11-15"),
        HISI_PMU_FORMAT_ATTR(datasrc_skt, "config1:16"),