]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/arm-smmu: Work around ARM DMA configuration
authorRobin Murphy <robin.murphy@arm.com>
Mon, 17 Oct 2016 11:06:21 +0000 (12:06 +0100)
committerJoerg Roedel <jroedel@suse.de>
Tue, 8 Nov 2016 13:46:41 +0000 (14:46 +0100)
commit2b3d5cd56f3e9790db1eb8f88aea0a78ab5b4cf5
treeaf302addd90b8fbc695ca7f93bacd8d6ea545b24
parent227ce641993c06c01b6ac0986ced6c2ef6b800df
iommu/arm-smmu: Work around ARM DMA configuration

The 32-bit ARM DMA configuration code predates the IOMMU core's default
domain functionality, and instead relies on allocating its own domains
and attaching any devices using the generic IOMMU binding to them.
Unfortunately, it does this relatively early on in the creation of the
device, before we've seen our add_device callback, which leads us to
attempt to operate on a half-configured master.

To avoid a crash, check for this situation on attach, but refuse to
play, as there's nothing we can do. This at least allows VFIO to keep
working for people who update their 32-bit DTs to the generic binding,
albeit with a few (innocuous) warnings from the DMA layer on boot.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/arm-smmu.c