iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
To: <linux-arm-kernel@lists.infradead.org>,
	<linux-acpi@vger.kernel.org>, <iommu@lists.linux-foundation.org>,
	<devel@acpica.org>
Cc: linuxarm@huawei.com, guohanjun@huawei.com, robin.murphy@arm.com,
	wanghuiqiang@huawei.com
Subject: [RFC PATCH 4/4] iommu/dma: Reserve any RMR regions associated with a dev
Date: Tue, 27 Oct 2020 11:26:46 +0000	[thread overview]
Message-ID: <20201027112646.44680-5-shameerali.kolothum.thodi@huawei.com> (raw)
In-Reply-To: <20201027112646.44680-1-shameerali.kolothum.thodi@huawei.com>

Added support to get RMR regions associated with a dev
reserved so that there is a unity mapping for them in
SMMU.

Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
---
 drivers/iommu/dma-iommu.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 0cbcd3fc3e7e..31eec16f2af8 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -153,15 +153,19 @@ EXPORT_SYMBOL(iommu_put_dma_cookie);
  * @list: Reserved region list from iommu_get_resv_regions()
  *
  * IOMMU drivers can use this to implement their .get_resv_regions callback
- * for general non-IOMMU-specific reservations. Currently, this covers GICv3
- * ITS region reservation on ACPI based ARM platforms that may require HW MSI
- * reservation.
+ * for general non-IOMMU-specific reservations. Currently this covers,
+ *  - GICv3 ITS region reservation on ACPI based ARM platforms that may
+ *    require HW MSI reservation.
+ *  - ACPI IORT RMR memory range reservations that require a unity mapping
+ *    in the SMMU for a given endpoint device.
  */
 void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list)
 {
 
-	if (!is_of_node(dev_iommu_fwspec_get(dev)->iommu_fwnode))
+	if (!is_of_node(dev_iommu_fwspec_get(dev)->iommu_fwnode)) {
 		iort_iommu_msi_get_resv_regions(dev, list);
+		iort_dev_rmr_get_resv_regions(dev, list);
+	}
 
 }
 EXPORT_SYMBOL(iommu_dma_get_resv_regions);
-- 
2.17.1

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  parent reply	other threads:[~2020-10-27 11:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 11:26 [RFC PATCH 0/4] ACPI/IORT: Support for IORT RMR node Shameer Kolothum
2020-10-27 11:26 ` [RFC PATCH 1/4] ACPICA: IORT: Update for revision E Shameer Kolothum
     [not found]   ` <BYAPR11MB3256AFF743B4FCC400F4181C87160@BYAPR11MB3256.namprd11.prod.outlook.com>
     [not found]     ` <610c14ef56d64fe087ca52aede07d811@huawei.com>
     [not found]       ` <MWHPR11MB1599988D7C857E3AFFA4A48AF0170@MWHPR11MB1599.namprd11.prod.outlook.com>
2020-10-28 18:40         ` [Devel] " Shameerali Kolothum Thodi
2020-10-27 11:26 ` [RFC PATCH 2/4] ACPI/IORT: Add support for RMR node parsing Shameer Kolothum
2020-10-28 18:43   ` [Devel] " David E. Box
2020-11-09 12:29     ` [Devel] " Sami Mujawar
2020-11-19 12:07       ` Shameerali Kolothum Thodi
2020-10-27 11:26 ` [RFC PATCH 3/4] ACPI/IORT: Add RMR memory regions reservation helper Shameer Kolothum
2020-11-05 18:03   ` Robin Murphy
2020-11-06  8:30     ` Shameerali Kolothum Thodi
2020-11-06 13:06       ` Robin Murphy
2020-11-06 16:00         ` Shameerali Kolothum Thodi
2020-10-27 11:26 ` Shameer Kolothum [this message]
2020-10-28 16:43 ` [RFC PATCH 0/4] ACPI/IORT: Support for IORT RMR node Steven Price
2020-10-28 18:24   ` Shameerali Kolothum Thodi
2020-11-06 15:22     ` Steven Price
2020-11-06 16:17       ` Shameerali Kolothum Thodi
2020-11-06 16:26         ` Steven Price
2020-11-06 17:09           ` Robin Murphy

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=20201027112646.44680-5-shameerali.kolothum.thodi@huawei.com \
    --to=shameerali.kolothum.thodi@huawei.com \
    --cc=devel@acpica.org \
    --cc=guohanjun@huawei.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linuxarm@huawei.com \
    --cc=robin.murphy@arm.com \
    --cc=wanghuiqiang@huawei.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;
as well as URLs for NNTP newsgroup(s).