]> git.baikalelectronics.ru Git - kernel.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)
commit63f427e0ca32af7e141e76a19f14e3378ed3f291
treeeb44248edd0bf337856bc56e879169662494b31a
parente67688dcb725acfdeaef258d27ec6fc34a157c3d
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