Commit 13f14790 authored by Yicong Yang's avatar Yicong Yang Committed by JiangShui
Browse files

perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09

mainline inclusion
from mainline-v6.6-rc1
commit 0242737d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I798Y2
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0242737dc4eb9f6e9a5ea594b3f93efa0b12f28d



-----------------------------------------------------------------------

Some HiSilicon SMMU PMCG suffers the erratum 162001900 that the PMU
disable control sometimes fail to disable the counters. This will lead
to error or inaccurate data since before we enable the counters the
counter's still counting for the event used in last perf session.

This patch tries to fix this by hardening the global disable process.
Before disable the PMU, writing an invalid event type (0xffff) to
focibly stop the counters. Correspondingly restore each events on
pmu::pmu_enable().

Signed-off-by: default avatarYicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20230814124012.58013-1-yangyicong@huawei.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarCaiJian <caijian11@h-partners.com>
parent f88f658f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment