[PATCH 1/7] irqchip/alpine-msi: Call IOMMU DMA mapping MSI message hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add missing IOMMU DMA mapping MSI message hook in compose_msi_msg()
callback for Alpine MSIx driver, to map the MSI physical address to
IOMMU IOVA for any device attached to IOMMU DMA ops domains.

Signed-off-by: Hanna Hawa <hhhawa@xxxxxxxxxx>
Co-developed-by: Vladimir Aerov <vaerov@xxxxxxxxxx>
Signed-off-by: Vladimir Aerov <vaerov@xxxxxxxxxx>
---
 drivers/irqchip/irq-alpine-msi.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/irqchip/irq-alpine-msi.c b/drivers/irqchip/irq-alpine-msi.c
index 23a3b87..ae2fca7 100644
--- a/drivers/irqchip/irq-alpine-msi.c
+++ b/drivers/irqchip/irq-alpine-msi.c
@@ -12,6 +12,7 @@
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
+#include <linux/dma-iommu.h>
 #include <linux/irqchip.h>
 #include <linux/irqchip/arm-gic.h>
 #include <linux/msi.h>
@@ -99,6 +100,12 @@ static void alpine_msix_compose_msi_msg(struct irq_data *data,
 	msg->address_hi = upper_32_bits(msg_addr);
 	msg->address_lo = lower_32_bits(msg_addr);
 	msg->data = 0;
+
+	/*
+	 * Mapping MSI address to IOMMU IOVA, relevant for devices associated
+	 * with IOMMU DMA ops domain.
+	 */
+	iommu_dma_map_msi_msg(data->irq, msg);
 }
 
 static struct msi_domain_info alpine_msix_domain_info = {
-- 
2.7.4




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux