All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] iommu/arm-smmu: Add module parameter to set msi iova address
@ 2020-05-27 16:03 ` Srinath Mannam via iommu
  0 siblings, 0 replies; 37+ messages in thread
From: Srinath Mannam @ 2020-05-27 16:03 UTC (permalink / raw)
  To: Will Deacon, Robin Murphy, Joerg Roedel
  Cc: bcm-kernel-feedback-list, linux-arm-kernel, iommu, linux-kernel,
	Srinath Mannam

This patch gives the provision to change default value of MSI IOVA base
to platform's suitable IOVA using module parameter. The present
hardcoded MSI IOVA base may not be the accessible IOVA ranges of platform.

Since commit aadad097cd46 ("iommu/dma: Reserve IOVA for PCIe inaccessible
DMA address"), inaccessible IOVA address ranges parsed from dma-ranges
property are reserved.

If any platform has the limitaion to access default MSI IOVA, then it can
be changed using "arm-smmu.msi_iova_base=0xa0000000" command line argument.

Signed-off-by: Srinath Mannam <srinath.mannam@broadcom.com>
---
 drivers/iommu/arm-smmu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
index 4f1a350..5e59c9d 100644
--- a/drivers/iommu/arm-smmu.c
+++ b/drivers/iommu/arm-smmu.c
@@ -72,6 +72,9 @@ static bool disable_bypass =
 module_param(disable_bypass, bool, S_IRUGO);
 MODULE_PARM_DESC(disable_bypass,
 	"Disable bypass streams such that incoming transactions from devices that are not attached to an iommu domain will report an abort back to the device and will not be allowed to pass through the SMMU.");
+static unsigned long msi_iova_base = MSI_IOVA_BASE;
+module_param(msi_iova_base, ulong, S_IRUGO);
+MODULE_PARM_DESC(msi_iova_base, "msi iova base address.");
 
 struct arm_smmu_s2cr {
 	struct iommu_group		*group;
@@ -1566,7 +1569,7 @@ static void arm_smmu_get_resv_regions(struct device *dev,
 	struct iommu_resv_region *region;
 	int prot = IOMMU_WRITE | IOMMU_NOEXEC | IOMMU_MMIO;
 
-	region = iommu_alloc_resv_region(MSI_IOVA_BASE, MSI_IOVA_LENGTH,
+	region = iommu_alloc_resv_region(msi_iova_base, MSI_IOVA_LENGTH,
 					 prot, IOMMU_RESV_SW_MSI);
 	if (!region)
 		return;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2020-05-28 13:11 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 16:03 [RFC PATCH] iommu/arm-smmu: Add module parameter to set msi iova address Srinath Mannam
2020-05-27 16:03 ` Srinath Mannam
2020-05-27 16:03 ` Srinath Mannam via iommu
2020-05-27 17:30 ` Robin Murphy
2020-05-27 17:30   ` Robin Murphy
2020-05-27 17:30   ` Robin Murphy
2020-05-28  5:15   ` Srinath Mannam
2020-05-28  5:15     ` Srinath Mannam
2020-05-28  5:15     ` Srinath Mannam via iommu
2020-05-28  7:23     ` Jean-Philippe Brucker
2020-05-28  7:23       ` Jean-Philippe Brucker
2020-05-28  7:23       ` Jean-Philippe Brucker
2020-05-28  7:43       ` Auger Eric
2020-05-28  7:43         ` Auger Eric
2020-05-28  7:43         ` Auger Eric
2020-05-28  8:38         ` Jean-Philippe Brucker
2020-05-28  8:38           ` Jean-Philippe Brucker
2020-05-28  8:38           ` Jean-Philippe Brucker
2020-05-28  8:53           ` Auger Eric
2020-05-28  8:53             ` Auger Eric
2020-05-28  8:53             ` Auger Eric
2020-05-28  9:15             ` Shameerali Kolothum Thodi
2020-05-28  9:15               ` Shameerali Kolothum Thodi
2020-05-28  9:15               ` Shameerali Kolothum Thodi
2020-05-28 11:47               ` Auger Eric
2020-05-28 11:48               ` Auger Eric
2020-05-28 11:48                 ` Auger Eric
2020-05-28 11:48                 ` Auger Eric
2020-05-28 12:09                 ` Shameerali Kolothum Thodi
2020-05-28 12:09                   ` Shameerali Kolothum Thodi
2020-05-28 12:09                   ` Shameerali Kolothum Thodi
2020-05-28 13:11                   ` Auger Eric
2020-05-28 13:11                     ` Auger Eric
2020-05-28 13:11                     ` Auger Eric
2020-05-28  7:21   ` Auger Eric
2020-05-28  7:21     ` Auger Eric
2020-05-28  7:21     ` Auger Eric

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.