[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1569854031-237636-6-git-send-email-john.garry@huawei.com>
Date: Mon, 30 Sep 2019 22:33:50 +0800
From: John Garry <john.garry@...wei.com>
To: <lorenzo.pieralisi@....com>, <guohanjun@...wei.com>,
<sudeep.holla@....com>, <robin.murphy@....com>,
<mark.rutland@....com>, <will@...nel.org>
CC: <shameerali.kolothum.thodi@...wei.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <iommu@...ts.linux-foundation.org>,
<rjw@...ysocki.net>, <lenb@...nel.org>, <nleeder@...eaurora.org>,
<linuxarm@...wei.com>, John Garry <john.garry@...wei.com>
Subject: [RFC PATCH 5/6] perf/smmuv3: Match implementation options based on parent SMMU IIDR
Currently we match the implementation options based on the ACPI PLATFORM
OEM ID.
Since we can now match based on the parent SMMUv3 IIDR, switch to this
method.
Signed-off-by: John Garry <john.garry@...wei.com>
---
drivers/perf/arm_smmuv3_pmu.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/drivers/perf/arm_smmuv3_pmu.c b/drivers/perf/arm_smmuv3_pmu.c
index 11f28ba5fae0..33d1379ae525 100644
--- a/drivers/perf/arm_smmuv3_pmu.c
+++ b/drivers/perf/arm_smmuv3_pmu.c
@@ -739,14 +739,10 @@ static void smmu_pmu_reset(struct smmu_pmu *smmu_pmu)
smmu_pmu->reloc_base + SMMU_PMCG_OVSCLR0);
}
-static void smmu_pmu_get_acpi_options(struct smmu_pmu *smmu_pmu)
+static void smmu_pmu_get_implementation_options(struct smmu_pmu *smmu_pmu)
{
- u32 model;
-
- model = *(u32 *)dev_get_platdata(smmu_pmu->dev);
-
- switch (model) {
- case IORT_SMMU_V3_PMCG_HISI_HIP08:
+ switch (smmu_pmu->parent_iidr) {
+ case PARENT_SMMU_IIDR_HISI_HIP08:
/* HiSilicon Erratum 162001800 */
smmu_pmu->options |= SMMU_PMCG_EVCNTR_RDONLY;
break;
@@ -844,7 +840,7 @@ static int smmu_pmu_probe(struct platform_device *pdev)
return -EINVAL;
}
- smmu_pmu_get_acpi_options(smmu_pmu);
+ smmu_pmu_get_implementation_options(smmu_pmu);
/* Pick one CPU to be the preferred one to use */
smmu_pmu->on_cpu = raw_smp_processor_id();
--
2.17.1
Powered by blists - more mailing lists