diff options
author | Qi Liu <liuqi115@huawei.com> | 2022-04-15 13:23:51 +0300 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2022-05-06 17:14:31 +0300 |
commit | 807907dae9701c4b0593d5195d4839f17d103314 (patch) | |
tree | e3c2ed40d10d265fc6a2d2b85f5375825c9f823f /drivers/perf/hisilicon/hisi_uncore_pmu.c | |
parent | 47a9ed88a4fc6c67ea7f1d65df28d2eb6a89bbbb (diff) | |
download | linux-807907dae9701c4b0593d5195d4839f17d103314.tar.xz |
drivers/perf: hisi: Associate PMUs in SICL with CPUs online
If a PMU is in a SICL (Super IO cluster), it is not appropriate to
associate this PMU with a CPU die. So we associate it with all CPUs
online, rather than CPUs in the nearest SCCL.
As the firmware of Hip09 platform hasn't been published yet, change
of PMU driver will not influence backwards compatibility between
driver and firmware.
Signed-off-by: Qi Liu <liuqi115@huawei.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Link: https://lore.kernel.org/r/20220415102352.6665-2-liuqi115@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'drivers/perf/hisilicon/hisi_uncore_pmu.c')
-rw-r--r-- | drivers/perf/hisilicon/hisi_uncore_pmu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/perf/hisilicon/hisi_uncore_pmu.c b/drivers/perf/hisilicon/hisi_uncore_pmu.c index 358e4e284a62..980b9ee6eb14 100644 --- a/drivers/perf/hisilicon/hisi_uncore_pmu.c +++ b/drivers/perf/hisilicon/hisi_uncore_pmu.c @@ -458,6 +458,10 @@ static bool hisi_pmu_cpu_is_associated_pmu(struct hisi_pmu *hisi_pmu) { int sccl_id, ccl_id; + /* If SCCL_ID is -1, the PMU is in a SICL and has no CPU affinity */ + if (hisi_pmu->sccl_id == -1) + return true; + if (hisi_pmu->ccl_id == -1) { /* If CCL_ID is -1, the PMU only shares the same SCCL */ hisi_read_sccl_and_ccl_id(&sccl_id, NULL); |