kernel_optimize_test/drivers/iommu
Suravee Suthikulpanit a19d18a117 iommu/amd: Fix performance counter initialization
[ Upstream commit 6778ff5b21bd8e78c8bd547fd66437cf2657fd9b ]

Certain AMD platforms enable power gating feature for IOMMU PMC,
which prevents the IOMMU driver from updating the counter while
trying to validate the PMC functionality in the init_iommu_perf_ctr().
This results in disabling PMC support and the following error message:

    "AMD-Vi: Unable to read/write to IOMMU perf counter"

To workaround this issue, disable power gating temporarily by programming
the counter source to non-zero value while validating the counter,
and restore the prior state afterward.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Tested-by: Tj (Elloe Linux) <ml.linux@elloe.vision>
Link: https://lore.kernel.org/r/20210208122712.5048-1-suravee.suthikulpanit@amd.com
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201753
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-03-17 17:06:24 +01:00
..
amd iommu/amd: Fix performance counter initialization 2021-03-17 17:06:24 +01:00
arm iommu/arm-smmu-qcom: Fix mask extraction for bootloader programmed SMRs 2021-03-04 11:38:35 +01:00
intel iommu/vt-d: Clear PRQ overflow only when PRQ is empty 2021-03-17 17:06:23 +01:00
dma-iommu.c dma-mapping updates for 5.10 2020-10-15 14:43:29 -07:00
exynos-iommu.c
fsl_pamu_domain.c
fsl_pamu_domain.h
fsl_pamu.c
fsl_pamu.h
hyperv-iommu.c
io-pgtable-arm-v7s.c
io-pgtable-arm.c iommu/io-pgtable-arm: Support coherency for Mali LPAE 2021-02-07 15:37:12 +01:00
io-pgtable-arm.h
io-pgtable.c
ioasid.c
iommu-debugfs.c
iommu-sysfs.c
iommu-traces.c
iommu.c iommu: Properly pass gfp_t in _iommu_map() to avoid atomic sleeping 2021-03-04 11:38:03 +01:00
iova.c
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
Kconfig
Makefile
msm_iommu_hw-8xxx.h
msm_iommu.c
msm_iommu.h
mtk_iommu_v1.c
mtk_iommu.c iommu: Switch gather->end to the inclusive end 2021-03-04 11:38:01 +01:00
mtk_iommu.h
of_iommu.c
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c
s390-iommu.c
sun50i-iommu.c
tegra-gart.c
tegra-smmu.c
virtio-iommu.c