ANDROID: qcom: iommu: Use restricted vendor hook for dma ops

Use rvh instead of vh for the iommu_setup_dma_ops to prevent
sleeping while atomic bugs as mutexes are used to serialize
access to iova regions.

Bug: 216657571
Change-Id: If90d0714576ed6ca4b014b1447a1518f05a7ed0b
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
This commit is contained in:
Georgi Djakov
2022-01-26 11:06:36 -08:00
committed by Suren Baghdasaryan
parent 242d64a6bd
commit 2ab4227174
4 changed files with 5 additions and 5 deletions

View File

@@ -111,9 +111,9 @@
__sysfs_match_string
__tasklet_hi_schedule
__tasklet_schedule
__tracepoint_android_rvh_iommu_setup_dma_ops
__tracepoint_android_vh_cpu_idle_enter
__tracepoint_android_vh_cpu_idle_exit
__tracepoint_android_vh_iommu_setup_dma_ops
__tracepoint_android_vh_ipi_stop
__tracepoint_android_vh_jiffies_update
__tracepoint_android_vh_printk_hotplug

View File

@@ -52,7 +52,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
dev->dma_coherent = coherent;
if (iommu) {
iommu_setup_dma_ops(dev, dma_base, dma_base + size - 1);
trace_android_vh_iommu_setup_dma_ops(dev, dma_base, dma_base + size - 1);
trace_android_rvh_iommu_setup_dma_ops(dev, dma_base, dma_base + size - 1);
}
#ifdef CONFIG_XEN

View File

@@ -155,7 +155,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_uic_command);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_send_tm_command);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ufs_check_int_errors);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_attach);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_iommu_setup_dma_ops);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_iommu_setup_dma_ops);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_iommu_iovad_alloc_iova);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_iommu_iovad_free_iova);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ptype_head);

View File

@@ -12,9 +12,9 @@
#include <linux/tracepoint.h>
#include <trace/hooks/vendor_hooks.h>
DECLARE_HOOK(android_vh_iommu_setup_dma_ops,
DECLARE_RESTRICTED_HOOK(android_rvh_iommu_setup_dma_ops,
TP_PROTO(struct device *dev, u64 dma_base, u64 dma_limit),
TP_ARGS(dev, dma_base, dma_limit));
TP_ARGS(dev, dma_base, dma_limit), 1);
struct iova_domain;