ANDROID: iommu: add vendor hooks for change dma property
A vendor hook was added that allows the property value to vary depending on the dma attribute. Bug: 327086402 Change-Id: Ic415f019b861730feb40e10ada856ee63327153e Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>
This commit is contained in:
committed by
Treehugger Robot
parent
f22b02c473
commit
7d3b2c27d0
@@ -110,6 +110,7 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_io_statistics);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_cgroup_attach);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_iommu_setup_dma_ops);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_iommu_alloc_insert_iova);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_iommu_dma_info_to_prot);
|
||||
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_rvh_psci_tos_resident_on);
|
||||
|
||||
@@ -751,6 +751,8 @@ static int dma_info_to_prot(enum dma_data_direction dir, bool coherent,
|
||||
if (attrs & DMA_ATTR_PRIVILEGED)
|
||||
prot |= IOMMU_PRIV;
|
||||
|
||||
trace_android_rvh_iommu_dma_info_to_prot(attrs, &prot);
|
||||
|
||||
switch (dir) {
|
||||
case DMA_BIDIRECTIONAL:
|
||||
return prot | IOMMU_READ | IOMMU_WRITE;
|
||||
|
||||
@@ -23,6 +23,10 @@ DECLARE_RESTRICTED_HOOK(android_rvh_iommu_alloc_insert_iova,
|
||||
TP_ARGS(iovad, size, limit_pfn, new_iova, size_aligned, ret),
|
||||
1);
|
||||
|
||||
DECLARE_RESTRICTED_HOOK(android_rvh_iommu_dma_info_to_prot,
|
||||
TP_PROTO(unsigned long attrs, int *prot),
|
||||
TP_ARGS(attrs, prot), 1);
|
||||
|
||||
DECLARE_HOOK(android_vh_iommu_iovad_alloc_iova,
|
||||
TP_PROTO(struct device *dev, struct iova_domain *iovad, dma_addr_t iova, size_t size),
|
||||
TP_ARGS(dev, iovad, iova, size));
|
||||
|
||||
Reference in New Issue
Block a user