]> asedeno.scripts.mit.edu Git - linux.git/commit
iommu: Add API to request DMA domain for device
authorLu Baolu <baolu.lu@linux.intel.com>
Sat, 25 May 2019 05:41:22 +0000 (13:41 +0800)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 May 2019 14:56:43 +0000 (16:56 +0200)
commit7423e01741dd6a5f1255f589145313f0fb1c8cbe
treeeb44248edd0bf337856bc56e879169662494b31a
parentdd5142ca5d24bcdb22e40add842d50a59ffa769e
iommu: Add API to request DMA domain for device

Normally during iommu probing a device, a default doamin will
be allocated and attached to the device. The domain type of
the default domain is statically defined, which results in a
situation where the allocated default domain isn't suitable
for the device due to some limitations. We already have API
iommu_request_dm_for_dev() to replace a DMA domain with an
identity one. This adds iommu_request_dma_domain_for_dev()
to request a dma domain if an allocated identity domain isn't
suitable for the device in question.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
include/linux/iommu.h