summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/Kconfig
diff options
context:
space:
mode:
authorJulien Grall2019-05-01 15:58:19 +0200
committerMarc Zyngier2019-05-03 16:19:46 +0200
commitece6e6f0218b7777e650bf93728130ae6f4feb7d (patch)
tree40260544d7b400f04aa5f89df961c55aac8ac96e /drivers/iommu/Kconfig
parentgenirq/msi: Add a new field in msi_desc to store an IOMMU cookie (diff)
downloadkernel-qcow2-linux-ece6e6f0218b7777e650bf93728130ae6f4feb7d.tar.gz
kernel-qcow2-linux-ece6e6f0218b7777e650bf93728130ae6f4feb7d.tar.xz
kernel-qcow2-linux-ece6e6f0218b7777e650bf93728130ae6f4feb7d.zip
iommu/dma-iommu: Split iommu_dma_map_msi_msg() in two parts
On RT, iommu_dma_map_msi_msg() may be called from non-preemptible context. This will lead to a splat with CONFIG_DEBUG_ATOMIC_SLEEP as the function is using spin_lock (they can sleep on RT). iommu_dma_map_msi_msg() is used to map the MSI page in the IOMMU PT and update the MSI message with the IOVA. Only the part to lookup for the MSI page requires to be called in preemptible context. As the MSI page cannot change over the lifecycle of the MSI interrupt, the lookup can be cached and re-used later on. iomma_dma_map_msi_msg() is now split in two functions: - iommu_dma_prepare_msi(): This function will prepare the mapping in the IOMMU and store the cookie in the structure msi_desc. This function should be called in preemptible context. - iommu_dma_compose_msi_msg(): This function will update the MSI message with the IOVA when the device is behind an IOMMU. Signed-off-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Acked-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'drivers/iommu/Kconfig')
-rw-r--r--drivers/iommu/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
index 6f07f3b21816..eb1c8cd243f9 100644
--- a/drivers/iommu/Kconfig
+++ b/drivers/iommu/Kconfig
@@ -94,6 +94,7 @@ config IOMMU_DMA
bool
select IOMMU_API
select IOMMU_IOVA
+ select IRQ_MSI_IOMMU
select NEED_SG_DMA_LENGTH
config FSL_PAMU