perf/smmuv3: Enable HiSilicon Erratum 162001800 quirk
authorShameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Tue, 26 Mar 2019 15:17:53 +0000 (15:17 +0000)
committerWill Deacon <will.deacon@arm.com>
Thu, 4 Apr 2019 15:49:22 +0000 (16:49 +0100)
commit24062fe85860debfdae0eeaa495f27c9971ec163
tree95df5553d96f619adbcb5728ec711a8dbf5aa1cf
parentf202cdab3b48d8c2c1846c938ea69cb8aa897699
perf/smmuv3: Enable HiSilicon Erratum 162001800 quirk

HiSilicon erratum 162001800 describes the limitation of
SMMUv3 PMCG implementation on HiSilicon Hip08 platforms.

On these platforms, the PMCG event counter registers
(SMMU_PMCG_EVCNTRn) are read only and as a result it
is not possible to set the initial counter period value
on event monitor start.

To work around this, the current value of the counter
is read and used for delta calculations. OEM information
from ACPI header is used to identify the affected hardware
platforms.

Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
[will: update silicon-errata.txt and add reason string to acpi match]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Documentation/arm64/silicon-errata.txt
drivers/acpi/arm64/iort.c
drivers/perf/arm_smmuv3_pmu.c
include/linux/acpi_iort.h