From 60ceb2066c0d782518f5c9aa3b6e7894c30598a0 Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Wed, 4 Jan 2023 19:10:42 +0800 Subject: [PATCH] perf: hns3: add event suppport for ROH driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7BY7T CVE: NA ---------------------------------------------------------------------- Add ROH events support. Fixes: 66637ab137b4 ("drivers/perf: hisi: add driver for HNS3 PMU") Signed-off-by: Jian Shen --- drivers/perf/hisilicon/hns3_pmu.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/perf/hisilicon/hns3_pmu.c b/drivers/perf/hisilicon/hns3_pmu.c index 4cbe303f184e..76c2babed4d0 100644 --- a/drivers/perf/hisilicon/hns3_pmu.c +++ b/drivers/perf/hisilicon/hns3_pmu.c @@ -223,6 +223,8 @@ static enum cpuhp_state hns3_pmu_online; /* interrupt rate events */ #define HNS3_PMU_EVT_PPS_MSIX_NIC_INTR_NUM 0x00300 #define HNS3_PMU_EVT_PPS_MSIX_NIC_TIME 0x10300 +#define HNS3_PMU_EVT_PPS_MSIX_ROH_INTR_NUM 0x00301 +#define HNS3_PMU_EVT_PPS_MSIX_ROH_TIME 0x10301 /* filter mode supported by each bandwidth event */ #define HNS3_PMU_FILTER_BW_SSU_EGU 0x07 @@ -286,6 +288,7 @@ static enum cpuhp_state hns3_pmu_online; /* filter mode supported by each interrupt rate event */ #define HNS3_PMU_FILTER_INTR_MSIX_NIC 0x01 +#define HNS3_PMU_FILTER_INTR_MSIX_ROH 0x01 enum hns3_pmu_hw_filter_mode { HNS3_PMU_HW_FILTER_GLOBAL, @@ -580,6 +583,7 @@ static struct attribute *hns3_pmu_events_attr[] = { /* interrupt rate events */ HNS3_PMU_INTR_EVT_PAIR(pps_intr_msix_nic, MSIX_NIC), + HNS3_PMU_INTR_EVT_PAIR(pps_intr_msix_roh, MSIX_ROH), NULL }; @@ -647,6 +651,7 @@ static struct attribute *hns3_pmu_filter_mode_attr[] = { /* interrupt rate events */ HNS3_PMU_INTR_FLT_MODE_PAIR(pps_intr_msix_nic, MSIX_NIC), + HNS3_PMU_INTR_FLT_MODE_PAIR(pps_intr_msix_roh, MSIX_ROH), NULL }; -- GitLab