Skip to content
Commit 1748f086 authored by Patrick Daly's avatar Patrick Daly
Browse files

arm64: dma-mapping: Support attach after detach case



Iommu client drivers which use DOMAIN_ATTR_ATOMIC need to call
arm_iommu_detach_device() when their driver enters low power mode to
disable their clock/power votes. On wakeup they call
arm_iommu_attach_device() to reenable the iommu. To support this
usecase, ensure dma allocator state is freed as part of
arm_iommu_release_mapping().

Additionally, move memory allocations for dma allocator state to the
first arm_iommu_attach_device() call to allow clients to set iommu
domain attributes first.  This is expected to reduce memory use.

Change-Id: I0df29ee0de52c6f9b6621ec6f0105201c6ee5996
Signed-off-by: default avatarPatrick Daly <pdaly@codeaurora.org>
parent 62ba1928
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment