mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
iommu: Add apply_dm_region call-back to iommu-ops
This new call-back will be used by the iommu driver to do reserve the given dm_region in its iova space before the mapping is created. The call-back is temporary until the dma-ops implementation is part of the common iommu code. Signed-off-by: Joerg Roedel <[email protected]>
This commit is contained in:
parent
b548e786ce
commit
33b21a6b20
2 changed files with 6 additions and 0 deletions
|
|
@ -348,6 +348,9 @@ static int iommu_group_create_direct_mappings(struct iommu_group *group,
|
|||
list_for_each_entry(entry, &mappings, list) {
|
||||
dma_addr_t start, end, addr;
|
||||
|
||||
if (domain->ops->apply_dm_region)
|
||||
domain->ops->apply_dm_region(dev, domain, entry);
|
||||
|
||||
start = ALIGN(entry->start, pg_size);
|
||||
end = ALIGN(entry->start + entry->length, pg_size);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue