iommu/arm-smmu: detach DMA domain if driver is managing iommu
Before the driver is probed, arm_smmu_add_device() helpfully attaches
an IOMMU_DOMAIN_DMA domain. Which ofc does not support stalling, and
when the driver later attaches a domain that can_stall to an smmu that
can stall, the default _DMA domain prevents stalling from being enabled.
(And will cause further problems later)
One simple way to deal with this is simply toss the default _DMA domain
if the driver attaches it's own domain.
TODO maybe the tracking of list of attached domains should be done in
iommu core, so the detach can happen outside of group->mutex.
Signed-off-by:
Rob Clark <robdclark@gmail.com>
Loading
Please sign in to comment