linux-stable/drivers/iommu
Suravee Suthikulpanit a19d18a117 iommu/amd: Fix performance counter initialization
[ Upstream commit 6778ff5b21 ]

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 iommu/exynos: add missing put_device() call in exynos_iommu_of_xlate() 2020-09-24 10:48:29 +02:00
fsl_pamu.c iommu/pamu: Replace use of kzfree with kfree_sensitive 2020-09-18 10:59:04 +02:00
fsl_pamu.h
fsl_pamu_domain.c
fsl_pamu_domain.h
hyperv-iommu.c x86_ioapic_Consolidate_IOAPIC_allocation 2020-09-16 16:52:32 +02:00
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 iommu/io-pgtable-arm: Move some definitions to a header 2020-09-28 23:48:06 +01:00
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 iommu/iova: Replace cmpxchg with xchg in queue_iova 2020-09-04 12:11:06 +02:00
ipmmu-vmsa.c IOMMU Updates for Linux v5.9 2020-08-11 14:13:24 -07:00
irq_remapping.c iommu/irq_remapping: Consolidate irq domain lookup 2020-09-16 16:52:30 +02:00
irq_remapping.h iommu/irq_remapping: Consolidate irq domain lookup 2020-09-16 16:52:30 +02:00
Kconfig Merge branches 'arm/allwinner', 'arm/mediatek', 'arm/renesas', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/amd', 'x86/vt-d' and 'core' into next 2020-10-07 11:51:59 +02:00
Makefile
msm_iommu.c
msm_iommu.h
msm_iommu_hw-8xxx.h
mtk_iommu.c iommu: Switch gather->end to the inclusive end 2021-03-04 11:38:01 +01:00
mtk_iommu.h iommu/mediatek: Add support for MT8167 2020-09-18 10:29:12 +02:00
mtk_iommu_v1.c
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 iommu/sun50i: Fix set-but-not-used variable warning 2020-09-04 13:39:45 +02:00
tegra-gart.c
tegra-smmu.c iommu/tegra-smmu: Allow to group clients in same swgroup 2020-09-24 12:32:32 +02:00
virtio-iommu.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00