ANDROID: 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, as well GFP_KERNEL allocations are used. Bug: 214353193 Change-Id: I45f8f0404a247b67fd07a6831ff813bbc50fbca2 Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
This commit is contained in:
committed by
Charan Teja Kalla
parent
7a8ea9ee5f
commit
44e5824602
@@ -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
|
||||
|
||||
@@ -150,7 +150,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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user