android_kernel_xiaomi_sm7250/drivers/iommu
Sultan Alsawaf 4f1ab4600a iommu: msm: Rewrite to improve clarity and performance
This scope of this driver's lock usage is extremely wide, leading to
excessively long lock hold times. Additionally, there is lots of
excessive linked-list traversal and unnecessary dynamic memory
allocation in a critical path, causing poor performance across the
board.

Fix all of this by greatly reducing the scope of the locks used and by
significantly reducing the amount of operations performed when
msm_dma_map_sg_attrs() is called. The entire driver's code is overhauled
for better cleanliness and performance.

Note that ION must be modified to pass a known structure via the private
dma_buf pointer, so that the IOMMU driver can prevent races when
operating on the same buffer concurrently. This is the only way to
eliminate said buffer races without hurting the IOMMU driver's
performance.

Some additional members are added to the device struct as well to make
these various performance improvements possible.

This also removes the manual cache maintenance since ION already handles
it.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2022-11-12 11:24:01 +00:00
..
amd_iommu_debugfs.c
amd_iommu_init.c iommu/amd: Increase timeout waiting for GA log enablement 2022-06-14 16:59:26 +02:00
amd_iommu_proto.h
amd_iommu_quirks.c
amd_iommu_types.h iommu/amd: Set DTE[IntTabLen] to represent 512 IRTEs 2020-12-11 13:25:03 +01:00
amd_iommu_v2.c iommu/amd: Do not use IOMMUv2 functionality when SME is active 2020-09-17 13:45:26 +02:00
amd_iommu.c iommu/amd: Fix sleeping in atomic in increase_address_space() 2021-03-11 14:05:01 +01:00
amd_iommu.h
arm-smmu-debug.c iommu: arm-smmu: update copyright year to retain older copyright year 2020-08-24 01:30:19 -07:00
arm-smmu-debug.h iommu: arm-smmu: update copyright year to retain older copyright year 2020-08-24 01:30:19 -07:00
arm-smmu-regs.h Merge android-4.19-stable.125 (a483478) into msm-4.19 2020-09-20 23:45:10 +05:30
arm-smmu-v3.c drivers: iommu: Specify sync probe for arm-smmu-v3 driver 2022-11-12 11:19:38 +00:00
arm-smmu.c drivers: iommu: Specify sync probe for qsmmuv500-tbu 2022-11-12 11:19:38 +00:00
dma-iommu.c Merge android-4.19.111 (bfe2901) into msm-4.19 2020-07-16 13:51:27 +05:30
dma-mapping-fast.c dma-mapping-fast: Fix iova address leak with non-zero scatterlist offset 2021-10-13 18:20:46 +05:30
dmar.c iommu/vt-d: Fix PCI bus rescan device hot add 2022-07-12 16:29:01 +02:00
exynos-iommu.c iommu/exynos: Handle failed IOMMU device registration properly 2022-08-25 11:15:22 +02:00
fsl_pamu_domain.c Merge branches 'arm/exynos', 'arm/renesas', 'arm/rockchip', 'arm/omap', 'arm/mediatek', 'arm/tegra', 'arm/qcom', 'arm/smmu', 'ppc/pamu', 'x86/vt-d', 'x86/amd', 's390' and 'core' into next 2017-09-01 11:31:42 +02:00
fsl_pamu_domain.h iommu/fsl: Make use of domain_alloc and domain_free 2015-03-31 15:32:14 +02:00
fsl_pamu.c
fsl_pamu.h iommu: Remove pci.h include from trace/events/iommu.h 2017-04-29 00:20:49 +02:00
intel_irq_remapping.c iommu/vt-d: Fix potential memory leak in intel_setup_irq_remapping() 2022-02-08 18:23:15 +01:00
intel-iommu.c iommu/vt-d: Clean up si_domain in the init_dmars() error path 2022-11-03 23:52:26 +09:00
intel-pasid.c
intel-pasid.h
intel-svm.c iommu/vt-d: Fix mm reference leak 2020-04-23 10:30:21 +02:00
io-pgtable-arm-v7s.c UPSTREAM: iommu: Allow io-pgtable to be used outside of drivers/iommu/ 2020-01-10 15:15:57 +00:00
io-pgtable-arm.c iommu/io-pgtable-arm: Fix table descriptor paddr formatting 2022-01-27 09:04:22 +01:00
io-pgtable-fast.c Merge android-4.19-stable.125 (a483478) into msm-4.19 2020-09-20 23:45:10 +05:30
io-pgtable-msm-secure.c iommu/arm-smmu: Allocate non-coherent memory for secure pagetables 2021-04-06 18:14:39 +05:30
io-pgtable.c iommu: Update function for ARM_MSM_SECURE io pagetable type 2021-03-22 10:24:18 +05:30
iommu-debug.c iommu: arm-smmu: Add support for new attributes 2020-03-27 19:47:55 +05:30
iommu-debugfs.c Merge android-4.19.110 (1984fff) into msm-4.19 2020-05-23 05:08:22 -07:00
iommu-logger.c iommu: qti: Track iommu domains 2020-01-24 13:53:40 -08:00
iommu-logger.h iommu: qti: Track iommu domains 2020-01-24 13:53:40 -08:00
iommu-sysfs.c ANDROID: GKI: add missing exports for CONFIG_ARM_SMMU=m 2020-04-09 17:03:10 +00:00
iommu-traces.c ANDROID: GKI: add missing exports for CONFIG_ARM_SMMU=m 2020-04-09 17:03:10 +00:00
iommu.c iommu/arm-smmu: override writel_relaxed in smmu global address space 2021-03-03 11:49:57 +05:30
iova.c Merge tag 'ASB-2022-02-05_4.19-stable' of https://github.com/aosp-mirror/kernel_common into android12-base 2022-02-26 20:19:49 +05:30
ipmmu-vmsa.c UPSTREAM: iommu: Allow io-pgtable to be used outside of drivers/iommu/ 2020-01-10 15:15:57 +00:00
irq_remapping.c
irq_remapping.h
Kconfig Merge android-4.19-stable.125 (a483478) into msm-4.19 2020-09-20 23:45:10 +05:30
Makefile ANDROID: GKI: iommu: dma-mapping-fast: Fast ARMv7/v8 Long Descriptor Format 2020-05-01 21:56:54 -07:00
msm_dma_iommu_mapping.c iommu: msm: Rewrite to improve clarity and performance 2022-11-12 11:24:01 +00:00
msm_iommu_hw-8xxx.h
msm_iommu.c drivers: iommu: Specify sync probe for msm_iommu driver 2022-11-12 11:19:38 +00:00
msm_iommu.h iommu/msm: Make use of iommu_device_register interface 2017-02-10 13:44:57 +01:00
mtk_iommu_v1.c
mtk_iommu.c iommu/mediatek: Add list_del in mtk_iommu_remove 2022-06-14 16:59:25 +02:00
mtk_iommu.h UPSTREAM: iommu: Allow io-pgtable to be used outside of drivers/iommu/ 2020-01-10 15:15:57 +00:00
of_iommu.c iommu: arm-smmu: Add atos self test 2020-04-24 09:54:37 +05:30
omap-iommu-debug.c iommu/omap: Fix buffer overflow in debugfs 2022-10-26 13:19:35 +02:00
omap-iommu.c
omap-iommu.h
omap-iopgtable.h iommu/omap: Use BIT(x) macros in omap-iopgtable.h 2015-08-03 16:04:42 +02:00
qcom_iommu.c drivers: iommu: Specify sync probe for qcom-iommu 2022-11-12 11:19:39 +00:00
rockchip-iommu.c iommu: rockchip: Free domain on .domain_free 2020-01-04 19:12:37 +01:00
s390-iommu.c
tegra-gart.c iommu: Remove the ->map_sg indirection 2018-08-08 11:06:20 +02:00
tegra-smmu.c iommu/tegra-smmu: Fix page tables in > 4 GiB memory 2020-01-04 19:12:38 +01:00