Skip to content

Commit

Permalink
arm64: Remove pointless WARN_ON in DMA teardown
Browse files Browse the repository at this point in the history
We expect arch_teardown_dma_ops() to be called very late in a device's
life, after it has been removed from its bus, and thus after the IOMMU
bus notifier has run. As such, even if this funny little check did make
sense, it's unlikely to achieve what it thinks it's trying to do anyway.
It's a residual trace of an earlier implementation which didn't belong
here from the start; belatedly snuff it out.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Robin Murphy authored and Catalin Marinas committed Nov 7, 2016
1 parent 4890ae4 commit b7b941a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions arch/arm64/mm/dma-mapping.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,11 +938,6 @@ static void __iommu_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,

void arch_teardown_dma_ops(struct device *dev)
{
struct iommu_domain *domain = iommu_get_domain_for_dev(dev);

if (WARN_ON(domain))
iommu_detach_device(domain, dev);

dev->archdata.dma_ops = NULL;
}

Expand Down

0 comments on commit b7b941a

Please sign in to comment.