From: Hanna Hawa <hhhawa@amazon.com>
To: tsahee@annapurnalabs.com, antoine.tenart@bootlin.com,
linux@armlinux.org.uk, catalin.marinas@arm.com,
will.deacon@arm.com, rjw@rjwysocki.net, lenb@kernel.org,
tglx@linutronix.de, jason@lakedaemon.net, marc.zyngier@arm.com
Cc: ronenk@amazon.com, dwmw@amazon.co.uk, vaerov@amazon.com,
zeev@amazon.com, alisaidi@amazon.com, talel@amazon.com,
hhhawa@amazon.com, jonnyc@amazon.com, hanochu@amazon.com,
barakw@amazon.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: [PATCH 1/7] irqchip/alpine-msi: Call IOMMU DMA mapping MSI message hook
Date: Sun, 31 Mar 2019 15:34:09 +0300 [thread overview]
Message-ID: <1554035655-11352-2-git-send-email-hhhawa@amazon.com> (raw)
In-Reply-To: <1554035655-11352-1-git-send-email-hhhawa@amazon.com>
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@amazon.com>
Co-developed-by: Vladimir Aerov <vaerov@amazon.com>
Signed-off-by: Vladimir Aerov <vaerov@amazon.com>
---
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
next prev parent reply other threads:[~2019-03-31 12:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-31 12:34 [PATCH 0/7] al-msi: Rename driver and add support for ACPI Hanna Hawa
2019-03-31 12:34 ` Hanna Hawa [this message]
2019-03-31 12:34 ` [PATCH 2/7] irqchip/alpine-msi: Update driver license to use SPDX Hanna Hawa
2019-03-31 12:46 ` Mukesh Ojha
2019-03-31 13:00 ` Hawa, Hanna
2019-04-01 11:52 ` David Woodhouse
2019-03-31 12:34 ` [PATCH 3/7] irqchip/al-msi: Rename AL-MSIx driver Hanna Hawa
2019-04-01 1:49 ` Marc Zyngier
2019-03-31 12:34 ` [PATCH 4/7] irqchip/al-msi: Update wrong parameter naming Hanna Hawa
2019-04-01 2:02 ` [PATCH 0/7] al-msi: Rename driver and add support for ACPI Marc Zyngier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1554035655-11352-2-git-send-email-hhhawa@amazon.com \
--to=hhhawa@amazon.com \
--cc=alisaidi@amazon.com \
--cc=antoine.tenart@bootlin.com \
--cc=barakw@amazon.com \
--cc=catalin.marinas@arm.com \
--cc=dwmw@amazon.co.uk \
--cc=hanochu@amazon.com \
--cc=jason@lakedaemon.net \
--cc=jonnyc@amazon.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=rjw@rjwysocki.net \
--cc=ronenk@amazon.com \
--cc=talel@amazon.com \
--cc=tglx@linutronix.de \
--cc=tsahee@annapurnalabs.com \
--cc=vaerov@amazon.com \
--cc=will.deacon@arm.com \
--cc=zeev@amazon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox