All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jordan Crouse <jcrouse@codeaurora.org>
To: linux-arm-msm@vger.kernel.org
Cc: Will Deacon <will@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	iommu@lists.linux-foundation.org,
	freedreno@lists.freedesktop.org,
	Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Hanna Hawa <hannah@marvell.com>, Joerg Roedel <joro@8bytes.org>,
	Jonathan Marek <jonathan@marek.ca>,
	Krishna Reddy <vdumpa@nvidia.com>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v12 03/13] iommu/arm-smmu: Prepare for the adreno-smmu implementation
Date: Mon, 10 Aug 2020 16:26:47 -0600	[thread overview]
Message-ID: <20200810222657.1841322-4-jcrouse@codeaurora.org> (raw)
In-Reply-To: <20200810222657.1841322-1-jcrouse@codeaurora.org>

Do a bit of prep work to add the upcoming adreno-smmu implementation.

Add an hook to allow the implementation to choose which context banks
to allocate. Then, add domain_attr_get / domain_attr_set hooks to allow
for implementation specific domain attributes.

Move some of the common structs to arm-smmu.h in anticipation of them
being used by the implementations and update some of the existing hooks
to pass more information that the implementation will need.

These modifications will be used by the upcoming Adreno SMMU
implementation to identify the GPU device and properly configure it
for pagetable switching.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---

 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c |  2 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c      | 83 ++++++++--------------
 drivers/iommu/arm/arm-smmu/arm-smmu.h      | 56 ++++++++++++++-
 3 files changed, 87 insertions(+), 54 deletions(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
index a9861dcd0884..88f17cc33023 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
@@ -69,7 +69,7 @@ static int cavium_cfg_probe(struct arm_smmu_device *smmu)
 }
 
 static int cavium_init_context(struct arm_smmu_domain *smmu_domain,
-		struct io_pgtable_cfg *pgtbl_cfg)
+		struct io_pgtable_cfg *pgtbl_cfg, struct device *dev)
 {
 	struct cavium_smmu *cs = container_of(smmu_domain->smmu,
 					      struct cavium_smmu, smmu);
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 976d43a7f2ff..e0a3e0da885b 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -65,41 +65,10 @@ 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.");
 
-struct arm_smmu_s2cr {
-	struct iommu_group		*group;
-	int				count;
-	enum arm_smmu_s2cr_type		type;
-	enum arm_smmu_s2cr_privcfg	privcfg;
-	u8				cbndx;
-};
-
 #define s2cr_init_val (struct arm_smmu_s2cr){				\
 	.type = disable_bypass ? S2CR_TYPE_FAULT : S2CR_TYPE_BYPASS,	\
 }
 
-struct arm_smmu_smr {
-	u16				mask;
-	u16				id;
-	bool				valid;
-};
-
-struct arm_smmu_cb {
-	u64				ttbr[2];
-	u32				tcr[2];
-	u32				mair[2];
-	struct arm_smmu_cfg		*cfg;
-};
-
-struct arm_smmu_master_cfg {
-	struct arm_smmu_device		*smmu;
-	s16				smendx[];
-};
-#define INVALID_SMENDX			-1
-#define cfg_smendx(cfg, fw, i) \
-	(i >= fw->num_ids ? INVALID_SMENDX : cfg->smendx[i])
-#define for_each_cfg_sme(cfg, fw, i, idx) \
-	for (i = 0; idx = cfg_smendx(cfg, fw, i), i < fw->num_ids; ++i)
-
 static bool using_legacy_binding, using_generic_binding;
 
 static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
@@ -234,19 +203,6 @@ static int arm_smmu_register_legacy_master(struct device *dev,
 }
 #endif /* CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS */
 
-static int __arm_smmu_alloc_bitmap(unsigned long *map, int start, int end)
-{
-	int idx;
-
-	do {
-		idx = find_next_zero_bit(map, end, start);
-		if (idx == end)
-			return -ENOSPC;
-	} while (test_and_set_bit(idx, map));
-
-	return idx;
-}
-
 static void __arm_smmu_free_bitmap(unsigned long *map, int idx)
 {
 	clear_bit(idx, map);
@@ -578,7 +534,7 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain,
 	}
 }
 
-static void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
+void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
 {
 	u32 reg;
 	bool stage1;
@@ -665,7 +621,8 @@ static void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
 }
 
 static int arm_smmu_init_domain_context(struct iommu_domain *domain,
-					struct arm_smmu_device *smmu)
+					struct arm_smmu_device *smmu,
+					struct device *dev)
 {
 	int irq, start, ret = 0;
 	unsigned long ias, oas;
@@ -780,10 +737,20 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 		ret = -EINVAL;
 		goto out_unlock;
 	}
-	ret = __arm_smmu_alloc_bitmap(smmu->context_map, start,
+
+	smmu_domain->smmu = smmu;
+
+	if (smmu->impl && smmu->impl->alloc_context_bank)
+		ret = smmu->impl->alloc_context_bank(smmu_domain, dev,
+				start, smmu->num_context_banks);
+	else
+		ret = __arm_smmu_alloc_bitmap(smmu->context_map, start,
 				      smmu->num_context_banks);
-	if (ret < 0)
+
+	if (ret < 0) {
+		smmu_domain->smmu = NULL;
 		goto out_unlock;
+	}
 
 	cfg->cbndx = ret;
 	if (smmu->version < ARM_SMMU_V2) {
@@ -798,8 +765,6 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 	else
 		cfg->asid = cfg->cbndx;
 
-	smmu_domain->smmu = smmu;
-
 	pgtbl_cfg = (struct io_pgtable_cfg) {
 		.pgsize_bitmap	= smmu->pgsize_bitmap,
 		.ias		= ias,
@@ -810,7 +775,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 	};
 
 	if (smmu->impl && smmu->impl->init_context) {
-		ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg);
+		ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg, dev);
 		if (ret)
 			goto out_clear_smmu;
 	}
@@ -1194,7 +1159,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
 		return ret;
 
 	/* Ensure that the domain is finalised */
-	ret = arm_smmu_init_domain_context(domain, smmu);
+	ret = arm_smmu_init_domain_context(domain, smmu, dev);
 	if (ret < 0)
 		goto rpm_put;
 
@@ -1534,6 +1499,13 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain,
 			*(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED);
 			return 0;
 		default:
+			if (smmu_domain->smmu) {
+				const struct arm_smmu_impl *impl = smmu_domain->smmu->impl;
+
+				if (impl && impl->domain_get_attr)
+					return impl->domain_get_attr(smmu_domain, attr, data);
+			}
+
 			return -ENODEV;
 		}
 		break;
@@ -1575,6 +1547,13 @@ static int arm_smmu_domain_set_attr(struct iommu_domain *domain,
 			break;
 		default:
 			ret = -ENODEV;
+
+			if (smmu_domain->smmu) {
+				const struct arm_smmu_impl *impl = smmu_domain->smmu->impl;
+
+				if (impl && impl->domain_get_attr)
+					ret = impl->domain_set_attr(smmu_domain, attr, data);
+			}
 		}
 		break;
 	case IOMMU_DOMAIN_DMA:
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm-smmu.h
index f3e456893f28..870f0fd060a5 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.h
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h
@@ -256,6 +256,21 @@ enum arm_smmu_implementation {
 	QCOM_SMMUV2,
 };
 
+struct arm_smmu_s2cr {
+	struct iommu_group		*group;
+	int				count;
+	enum arm_smmu_s2cr_type		type;
+	enum arm_smmu_s2cr_privcfg	privcfg;
+	u8				cbndx;
+};
+
+struct arm_smmu_smr {
+	u16				mask;
+	u16				id;
+	bool				valid;
+	bool				pinned;
+};
+
 struct arm_smmu_device {
 	struct device			*dev;
 
@@ -331,6 +346,13 @@ struct arm_smmu_cfg {
 };
 #define ARM_SMMU_INVALID_IRPTNDX	0xff
 
+struct arm_smmu_cb {
+	u64				ttbr[2];
+	u32				tcr[2];
+	u32				mair[2];
+	struct arm_smmu_cfg		*cfg;
+};
+
 enum arm_smmu_domain_stage {
 	ARM_SMMU_DOMAIN_S1 = 0,
 	ARM_SMMU_DOMAIN_S2,
@@ -350,6 +372,11 @@ struct arm_smmu_domain {
 	struct iommu_domain		domain;
 };
 
+struct arm_smmu_master_cfg {
+	struct arm_smmu_device		*smmu;
+	s16				smendx[];
+};
+
 static inline u32 arm_smmu_lpae_tcr(struct io_pgtable_cfg *cfg)
 {
 	u32 tcr = FIELD_PREP(ARM_SMMU_TCR_TG0, cfg->arm_lpae_s1_cfg.tcr.tg) |
@@ -400,14 +427,39 @@ struct arm_smmu_impl {
 	int (*cfg_probe)(struct arm_smmu_device *smmu);
 	int (*reset)(struct arm_smmu_device *smmu);
 	int (*init_context)(struct arm_smmu_domain *smmu_domain,
-			struct io_pgtable_cfg *cfg);
+			struct io_pgtable_cfg *cfg, struct device *dev);
 	void (*tlb_sync)(struct arm_smmu_device *smmu, int page, int sync,
 			 int status);
 	int (*def_domain_type)(struct device *dev);
 	irqreturn_t (*global_fault)(int irq, void *dev);
 	irqreturn_t (*context_fault)(int irq, void *dev);
+	int (*alloc_context_bank)(struct arm_smmu_domain *smmu_domain,
+			struct device *dev, int start, int max);
+	int (*domain_get_attr)(struct arm_smmu_domain *smmu_domain,
+			enum iommu_attr attr, void *data);
+	int (*domain_set_attr)(struct arm_smmu_domain *smmu_domain,
+			enum iommu_attr attr, void *data);
 };
 
+#define INVALID_SMENDX			-1
+#define cfg_smendx(cfg, fw, i) \
+	(i >= fw->num_ids ? INVALID_SMENDX : cfg->smendx[i])
+#define for_each_cfg_sme(cfg, fw, i, idx) \
+	for (i = 0; idx = cfg_smendx(cfg, fw, i), i < fw->num_ids; ++i)
+
+static inline int __arm_smmu_alloc_bitmap(unsigned long *map, int start, int end)
+{
+	int idx;
+
+	do {
+		idx = find_next_zero_bit(map, end, start);
+		if (idx == end)
+			return -ENOSPC;
+	} while (test_and_set_bit(idx, map));
+
+	return idx;
+}
+
 static inline void __iomem *arm_smmu_page(struct arm_smmu_device *smmu, int n)
 {
 	return smmu->base + (n << smmu->pgshift);
@@ -471,7 +523,9 @@ static inline void arm_smmu_writeq(struct arm_smmu_device *smmu, int page,
 struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu);
 struct arm_smmu_device *nvidia_smmu_impl_init(struct arm_smmu_device *smmu);
 struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu);
+struct arm_smmu_device *qcom_adreno_smmu_impl_init(struct arm_smmu_device *smmu);
 
+void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx);
 int arm_mmu500_reset(struct arm_smmu_device *smmu);
 
 #endif /* _ARM_SMMU_H */
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Jordan Crouse <jcrouse@codeaurora.org>
To: linux-arm-msm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Jonathan Marek <jonathan@marek.ca>,
	Will Deacon <will@kernel.org>,
	freedreno@lists.freedesktop.org, Hanna Hawa <hannah@marvell.com>,
	iommu@lists.linux-foundation.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Robin Murphy <robin.murphy@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v12 03/13] iommu/arm-smmu: Prepare for the adreno-smmu implementation
Date: Mon, 10 Aug 2020 16:26:47 -0600	[thread overview]
Message-ID: <20200810222657.1841322-4-jcrouse@codeaurora.org> (raw)
In-Reply-To: <20200810222657.1841322-1-jcrouse@codeaurora.org>

Do a bit of prep work to add the upcoming adreno-smmu implementation.

Add an hook to allow the implementation to choose which context banks
to allocate. Then, add domain_attr_get / domain_attr_set hooks to allow
for implementation specific domain attributes.

Move some of the common structs to arm-smmu.h in anticipation of them
being used by the implementations and update some of the existing hooks
to pass more information that the implementation will need.

These modifications will be used by the upcoming Adreno SMMU
implementation to identify the GPU device and properly configure it
for pagetable switching.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---

 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c |  2 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c      | 83 ++++++++--------------
 drivers/iommu/arm/arm-smmu/arm-smmu.h      | 56 ++++++++++++++-
 3 files changed, 87 insertions(+), 54 deletions(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
index a9861dcd0884..88f17cc33023 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
@@ -69,7 +69,7 @@ static int cavium_cfg_probe(struct arm_smmu_device *smmu)
 }
 
 static int cavium_init_context(struct arm_smmu_domain *smmu_domain,
-		struct io_pgtable_cfg *pgtbl_cfg)
+		struct io_pgtable_cfg *pgtbl_cfg, struct device *dev)
 {
 	struct cavium_smmu *cs = container_of(smmu_domain->smmu,
 					      struct cavium_smmu, smmu);
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 976d43a7f2ff..e0a3e0da885b 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -65,41 +65,10 @@ 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.");
 
-struct arm_smmu_s2cr {
-	struct iommu_group		*group;
-	int				count;
-	enum arm_smmu_s2cr_type		type;
-	enum arm_smmu_s2cr_privcfg	privcfg;
-	u8				cbndx;
-};
-
 #define s2cr_init_val (struct arm_smmu_s2cr){				\
 	.type = disable_bypass ? S2CR_TYPE_FAULT : S2CR_TYPE_BYPASS,	\
 }
 
-struct arm_smmu_smr {
-	u16				mask;
-	u16				id;
-	bool				valid;
-};
-
-struct arm_smmu_cb {
-	u64				ttbr[2];
-	u32				tcr[2];
-	u32				mair[2];
-	struct arm_smmu_cfg		*cfg;
-};
-
-struct arm_smmu_master_cfg {
-	struct arm_smmu_device		*smmu;
-	s16				smendx[];
-};
-#define INVALID_SMENDX			-1
-#define cfg_smendx(cfg, fw, i) \
-	(i >= fw->num_ids ? INVALID_SMENDX : cfg->smendx[i])
-#define for_each_cfg_sme(cfg, fw, i, idx) \
-	for (i = 0; idx = cfg_smendx(cfg, fw, i), i < fw->num_ids; ++i)
-
 static bool using_legacy_binding, using_generic_binding;
 
 static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
@@ -234,19 +203,6 @@ static int arm_smmu_register_legacy_master(struct device *dev,
 }
 #endif /* CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS */
 
-static int __arm_smmu_alloc_bitmap(unsigned long *map, int start, int end)
-{
-	int idx;
-
-	do {
-		idx = find_next_zero_bit(map, end, start);
-		if (idx == end)
-			return -ENOSPC;
-	} while (test_and_set_bit(idx, map));
-
-	return idx;
-}
-
 static void __arm_smmu_free_bitmap(unsigned long *map, int idx)
 {
 	clear_bit(idx, map);
@@ -578,7 +534,7 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain,
 	}
 }
 
-static void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
+void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
 {
 	u32 reg;
 	bool stage1;
@@ -665,7 +621,8 @@ static void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
 }
 
 static int arm_smmu_init_domain_context(struct iommu_domain *domain,
-					struct arm_smmu_device *smmu)
+					struct arm_smmu_device *smmu,
+					struct device *dev)
 {
 	int irq, start, ret = 0;
 	unsigned long ias, oas;
@@ -780,10 +737,20 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 		ret = -EINVAL;
 		goto out_unlock;
 	}
-	ret = __arm_smmu_alloc_bitmap(smmu->context_map, start,
+
+	smmu_domain->smmu = smmu;
+
+	if (smmu->impl && smmu->impl->alloc_context_bank)
+		ret = smmu->impl->alloc_context_bank(smmu_domain, dev,
+				start, smmu->num_context_banks);
+	else
+		ret = __arm_smmu_alloc_bitmap(smmu->context_map, start,
 				      smmu->num_context_banks);
-	if (ret < 0)
+
+	if (ret < 0) {
+		smmu_domain->smmu = NULL;
 		goto out_unlock;
+	}
 
 	cfg->cbndx = ret;
 	if (smmu->version < ARM_SMMU_V2) {
@@ -798,8 +765,6 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 	else
 		cfg->asid = cfg->cbndx;
 
-	smmu_domain->smmu = smmu;
-
 	pgtbl_cfg = (struct io_pgtable_cfg) {
 		.pgsize_bitmap	= smmu->pgsize_bitmap,
 		.ias		= ias,
@@ -810,7 +775,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 	};
 
 	if (smmu->impl && smmu->impl->init_context) {
-		ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg);
+		ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg, dev);
 		if (ret)
 			goto out_clear_smmu;
 	}
@@ -1194,7 +1159,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
 		return ret;
 
 	/* Ensure that the domain is finalised */
-	ret = arm_smmu_init_domain_context(domain, smmu);
+	ret = arm_smmu_init_domain_context(domain, smmu, dev);
 	if (ret < 0)
 		goto rpm_put;
 
@@ -1534,6 +1499,13 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain,
 			*(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED);
 			return 0;
 		default:
+			if (smmu_domain->smmu) {
+				const struct arm_smmu_impl *impl = smmu_domain->smmu->impl;
+
+				if (impl && impl->domain_get_attr)
+					return impl->domain_get_attr(smmu_domain, attr, data);
+			}
+
 			return -ENODEV;
 		}
 		break;
@@ -1575,6 +1547,13 @@ static int arm_smmu_domain_set_attr(struct iommu_domain *domain,
 			break;
 		default:
 			ret = -ENODEV;
+
+			if (smmu_domain->smmu) {
+				const struct arm_smmu_impl *impl = smmu_domain->smmu->impl;
+
+				if (impl && impl->domain_get_attr)
+					ret = impl->domain_set_attr(smmu_domain, attr, data);
+			}
 		}
 		break;
 	case IOMMU_DOMAIN_DMA:
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm-smmu.h
index f3e456893f28..870f0fd060a5 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.h
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h
@@ -256,6 +256,21 @@ enum arm_smmu_implementation {
 	QCOM_SMMUV2,
 };
 
+struct arm_smmu_s2cr {
+	struct iommu_group		*group;
+	int				count;
+	enum arm_smmu_s2cr_type		type;
+	enum arm_smmu_s2cr_privcfg	privcfg;
+	u8				cbndx;
+};
+
+struct arm_smmu_smr {
+	u16				mask;
+	u16				id;
+	bool				valid;
+	bool				pinned;
+};
+
 struct arm_smmu_device {
 	struct device			*dev;
 
@@ -331,6 +346,13 @@ struct arm_smmu_cfg {
 };
 #define ARM_SMMU_INVALID_IRPTNDX	0xff
 
+struct arm_smmu_cb {
+	u64				ttbr[2];
+	u32				tcr[2];
+	u32				mair[2];
+	struct arm_smmu_cfg		*cfg;
+};
+
 enum arm_smmu_domain_stage {
 	ARM_SMMU_DOMAIN_S1 = 0,
 	ARM_SMMU_DOMAIN_S2,
@@ -350,6 +372,11 @@ struct arm_smmu_domain {
 	struct iommu_domain		domain;
 };
 
+struct arm_smmu_master_cfg {
+	struct arm_smmu_device		*smmu;
+	s16				smendx[];
+};
+
 static inline u32 arm_smmu_lpae_tcr(struct io_pgtable_cfg *cfg)
 {
 	u32 tcr = FIELD_PREP(ARM_SMMU_TCR_TG0, cfg->arm_lpae_s1_cfg.tcr.tg) |
@@ -400,14 +427,39 @@ struct arm_smmu_impl {
 	int (*cfg_probe)(struct arm_smmu_device *smmu);
 	int (*reset)(struct arm_smmu_device *smmu);
 	int (*init_context)(struct arm_smmu_domain *smmu_domain,
-			struct io_pgtable_cfg *cfg);
+			struct io_pgtable_cfg *cfg, struct device *dev);
 	void (*tlb_sync)(struct arm_smmu_device *smmu, int page, int sync,
 			 int status);
 	int (*def_domain_type)(struct device *dev);
 	irqreturn_t (*global_fault)(int irq, void *dev);
 	irqreturn_t (*context_fault)(int irq, void *dev);
+	int (*alloc_context_bank)(struct arm_smmu_domain *smmu_domain,
+			struct device *dev, int start, int max);
+	int (*domain_get_attr)(struct arm_smmu_domain *smmu_domain,
+			enum iommu_attr attr, void *data);
+	int (*domain_set_attr)(struct arm_smmu_domain *smmu_domain,
+			enum iommu_attr attr, void *data);
 };
 
+#define INVALID_SMENDX			-1
+#define cfg_smendx(cfg, fw, i) \
+	(i >= fw->num_ids ? INVALID_SMENDX : cfg->smendx[i])
+#define for_each_cfg_sme(cfg, fw, i, idx) \
+	for (i = 0; idx = cfg_smendx(cfg, fw, i), i < fw->num_ids; ++i)
+
+static inline int __arm_smmu_alloc_bitmap(unsigned long *map, int start, int end)
+{
+	int idx;
+
+	do {
+		idx = find_next_zero_bit(map, end, start);
+		if (idx == end)
+			return -ENOSPC;
+	} while (test_and_set_bit(idx, map));
+
+	return idx;
+}
+
 static inline void __iomem *arm_smmu_page(struct arm_smmu_device *smmu, int n)
 {
 	return smmu->base + (n << smmu->pgshift);
@@ -471,7 +523,9 @@ static inline void arm_smmu_writeq(struct arm_smmu_device *smmu, int page,
 struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu);
 struct arm_smmu_device *nvidia_smmu_impl_init(struct arm_smmu_device *smmu);
 struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu);
+struct arm_smmu_device *qcom_adreno_smmu_impl_init(struct arm_smmu_device *smmu);
 
+void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx);
 int arm_mmu500_reset(struct arm_smmu_device *smmu);
 
 #endif /* _ARM_SMMU_H */
-- 
2.25.1

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

WARNING: multiple messages have this Message-ID (diff)
From: Jordan Crouse <jcrouse@codeaurora.org>
To: linux-arm-msm@vger.kernel.org
Cc: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>,
	linux-kernel@vger.kernel.org, Jonathan Marek <jonathan@marek.ca>,
	Will Deacon <will@kernel.org>,
	freedreno@lists.freedesktop.org, Hanna Hawa <hannah@marvell.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Nicolin Chen <nicoleotsuka@gmail.com>,
	iommu@lists.linux-foundation.org,
	Thierry Reding <thierry.reding@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Stephen Boyd <swboyd@chromium.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Joerg Roedel <joro@8bytes.org>,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v12 03/13] iommu/arm-smmu: Prepare for the adreno-smmu implementation
Date: Mon, 10 Aug 2020 16:26:47 -0600	[thread overview]
Message-ID: <20200810222657.1841322-4-jcrouse@codeaurora.org> (raw)
In-Reply-To: <20200810222657.1841322-1-jcrouse@codeaurora.org>

Do a bit of prep work to add the upcoming adreno-smmu implementation.

Add an hook to allow the implementation to choose which context banks
to allocate. Then, add domain_attr_get / domain_attr_set hooks to allow
for implementation specific domain attributes.

Move some of the common structs to arm-smmu.h in anticipation of them
being used by the implementations and update some of the existing hooks
to pass more information that the implementation will need.

These modifications will be used by the upcoming Adreno SMMU
implementation to identify the GPU device and properly configure it
for pagetable switching.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
---

 drivers/iommu/arm/arm-smmu/arm-smmu-impl.c |  2 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c      | 83 ++++++++--------------
 drivers/iommu/arm/arm-smmu/arm-smmu.h      | 56 ++++++++++++++-
 3 files changed, 87 insertions(+), 54 deletions(-)

diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
index a9861dcd0884..88f17cc33023 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu-impl.c
@@ -69,7 +69,7 @@ static int cavium_cfg_probe(struct arm_smmu_device *smmu)
 }
 
 static int cavium_init_context(struct arm_smmu_domain *smmu_domain,
-		struct io_pgtable_cfg *pgtbl_cfg)
+		struct io_pgtable_cfg *pgtbl_cfg, struct device *dev)
 {
 	struct cavium_smmu *cs = container_of(smmu_domain->smmu,
 					      struct cavium_smmu, smmu);
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c
index 976d43a7f2ff..e0a3e0da885b 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.c
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c
@@ -65,41 +65,10 @@ 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.");
 
-struct arm_smmu_s2cr {
-	struct iommu_group		*group;
-	int				count;
-	enum arm_smmu_s2cr_type		type;
-	enum arm_smmu_s2cr_privcfg	privcfg;
-	u8				cbndx;
-};
-
 #define s2cr_init_val (struct arm_smmu_s2cr){				\
 	.type = disable_bypass ? S2CR_TYPE_FAULT : S2CR_TYPE_BYPASS,	\
 }
 
-struct arm_smmu_smr {
-	u16				mask;
-	u16				id;
-	bool				valid;
-};
-
-struct arm_smmu_cb {
-	u64				ttbr[2];
-	u32				tcr[2];
-	u32				mair[2];
-	struct arm_smmu_cfg		*cfg;
-};
-
-struct arm_smmu_master_cfg {
-	struct arm_smmu_device		*smmu;
-	s16				smendx[];
-};
-#define INVALID_SMENDX			-1
-#define cfg_smendx(cfg, fw, i) \
-	(i >= fw->num_ids ? INVALID_SMENDX : cfg->smendx[i])
-#define for_each_cfg_sme(cfg, fw, i, idx) \
-	for (i = 0; idx = cfg_smendx(cfg, fw, i), i < fw->num_ids; ++i)
-
 static bool using_legacy_binding, using_generic_binding;
 
 static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
@@ -234,19 +203,6 @@ static int arm_smmu_register_legacy_master(struct device *dev,
 }
 #endif /* CONFIG_ARM_SMMU_LEGACY_DT_BINDINGS */
 
-static int __arm_smmu_alloc_bitmap(unsigned long *map, int start, int end)
-{
-	int idx;
-
-	do {
-		idx = find_next_zero_bit(map, end, start);
-		if (idx == end)
-			return -ENOSPC;
-	} while (test_and_set_bit(idx, map));
-
-	return idx;
-}
-
 static void __arm_smmu_free_bitmap(unsigned long *map, int idx)
 {
 	clear_bit(idx, map);
@@ -578,7 +534,7 @@ static void arm_smmu_init_context_bank(struct arm_smmu_domain *smmu_domain,
 	}
 }
 
-static void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
+void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
 {
 	u32 reg;
 	bool stage1;
@@ -665,7 +621,8 @@ static void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx)
 }
 
 static int arm_smmu_init_domain_context(struct iommu_domain *domain,
-					struct arm_smmu_device *smmu)
+					struct arm_smmu_device *smmu,
+					struct device *dev)
 {
 	int irq, start, ret = 0;
 	unsigned long ias, oas;
@@ -780,10 +737,20 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 		ret = -EINVAL;
 		goto out_unlock;
 	}
-	ret = __arm_smmu_alloc_bitmap(smmu->context_map, start,
+
+	smmu_domain->smmu = smmu;
+
+	if (smmu->impl && smmu->impl->alloc_context_bank)
+		ret = smmu->impl->alloc_context_bank(smmu_domain, dev,
+				start, smmu->num_context_banks);
+	else
+		ret = __arm_smmu_alloc_bitmap(smmu->context_map, start,
 				      smmu->num_context_banks);
-	if (ret < 0)
+
+	if (ret < 0) {
+		smmu_domain->smmu = NULL;
 		goto out_unlock;
+	}
 
 	cfg->cbndx = ret;
 	if (smmu->version < ARM_SMMU_V2) {
@@ -798,8 +765,6 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 	else
 		cfg->asid = cfg->cbndx;
 
-	smmu_domain->smmu = smmu;
-
 	pgtbl_cfg = (struct io_pgtable_cfg) {
 		.pgsize_bitmap	= smmu->pgsize_bitmap,
 		.ias		= ias,
@@ -810,7 +775,7 @@ static int arm_smmu_init_domain_context(struct iommu_domain *domain,
 	};
 
 	if (smmu->impl && smmu->impl->init_context) {
-		ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg);
+		ret = smmu->impl->init_context(smmu_domain, &pgtbl_cfg, dev);
 		if (ret)
 			goto out_clear_smmu;
 	}
@@ -1194,7 +1159,7 @@ static int arm_smmu_attach_dev(struct iommu_domain *domain, struct device *dev)
 		return ret;
 
 	/* Ensure that the domain is finalised */
-	ret = arm_smmu_init_domain_context(domain, smmu);
+	ret = arm_smmu_init_domain_context(domain, smmu, dev);
 	if (ret < 0)
 		goto rpm_put;
 
@@ -1534,6 +1499,13 @@ static int arm_smmu_domain_get_attr(struct iommu_domain *domain,
 			*(int *)data = (smmu_domain->stage == ARM_SMMU_DOMAIN_NESTED);
 			return 0;
 		default:
+			if (smmu_domain->smmu) {
+				const struct arm_smmu_impl *impl = smmu_domain->smmu->impl;
+
+				if (impl && impl->domain_get_attr)
+					return impl->domain_get_attr(smmu_domain, attr, data);
+			}
+
 			return -ENODEV;
 		}
 		break;
@@ -1575,6 +1547,13 @@ static int arm_smmu_domain_set_attr(struct iommu_domain *domain,
 			break;
 		default:
 			ret = -ENODEV;
+
+			if (smmu_domain->smmu) {
+				const struct arm_smmu_impl *impl = smmu_domain->smmu->impl;
+
+				if (impl && impl->domain_get_attr)
+					ret = impl->domain_set_attr(smmu_domain, attr, data);
+			}
 		}
 		break;
 	case IOMMU_DOMAIN_DMA:
diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.h b/drivers/iommu/arm/arm-smmu/arm-smmu.h
index f3e456893f28..870f0fd060a5 100644
--- a/drivers/iommu/arm/arm-smmu/arm-smmu.h
+++ b/drivers/iommu/arm/arm-smmu/arm-smmu.h
@@ -256,6 +256,21 @@ enum arm_smmu_implementation {
 	QCOM_SMMUV2,
 };
 
+struct arm_smmu_s2cr {
+	struct iommu_group		*group;
+	int				count;
+	enum arm_smmu_s2cr_type		type;
+	enum arm_smmu_s2cr_privcfg	privcfg;
+	u8				cbndx;
+};
+
+struct arm_smmu_smr {
+	u16				mask;
+	u16				id;
+	bool				valid;
+	bool				pinned;
+};
+
 struct arm_smmu_device {
 	struct device			*dev;
 
@@ -331,6 +346,13 @@ struct arm_smmu_cfg {
 };
 #define ARM_SMMU_INVALID_IRPTNDX	0xff
 
+struct arm_smmu_cb {
+	u64				ttbr[2];
+	u32				tcr[2];
+	u32				mair[2];
+	struct arm_smmu_cfg		*cfg;
+};
+
 enum arm_smmu_domain_stage {
 	ARM_SMMU_DOMAIN_S1 = 0,
 	ARM_SMMU_DOMAIN_S2,
@@ -350,6 +372,11 @@ struct arm_smmu_domain {
 	struct iommu_domain		domain;
 };
 
+struct arm_smmu_master_cfg {
+	struct arm_smmu_device		*smmu;
+	s16				smendx[];
+};
+
 static inline u32 arm_smmu_lpae_tcr(struct io_pgtable_cfg *cfg)
 {
 	u32 tcr = FIELD_PREP(ARM_SMMU_TCR_TG0, cfg->arm_lpae_s1_cfg.tcr.tg) |
@@ -400,14 +427,39 @@ struct arm_smmu_impl {
 	int (*cfg_probe)(struct arm_smmu_device *smmu);
 	int (*reset)(struct arm_smmu_device *smmu);
 	int (*init_context)(struct arm_smmu_domain *smmu_domain,
-			struct io_pgtable_cfg *cfg);
+			struct io_pgtable_cfg *cfg, struct device *dev);
 	void (*tlb_sync)(struct arm_smmu_device *smmu, int page, int sync,
 			 int status);
 	int (*def_domain_type)(struct device *dev);
 	irqreturn_t (*global_fault)(int irq, void *dev);
 	irqreturn_t (*context_fault)(int irq, void *dev);
+	int (*alloc_context_bank)(struct arm_smmu_domain *smmu_domain,
+			struct device *dev, int start, int max);
+	int (*domain_get_attr)(struct arm_smmu_domain *smmu_domain,
+			enum iommu_attr attr, void *data);
+	int (*domain_set_attr)(struct arm_smmu_domain *smmu_domain,
+			enum iommu_attr attr, void *data);
 };
 
+#define INVALID_SMENDX			-1
+#define cfg_smendx(cfg, fw, i) \
+	(i >= fw->num_ids ? INVALID_SMENDX : cfg->smendx[i])
+#define for_each_cfg_sme(cfg, fw, i, idx) \
+	for (i = 0; idx = cfg_smendx(cfg, fw, i), i < fw->num_ids; ++i)
+
+static inline int __arm_smmu_alloc_bitmap(unsigned long *map, int start, int end)
+{
+	int idx;
+
+	do {
+		idx = find_next_zero_bit(map, end, start);
+		if (idx == end)
+			return -ENOSPC;
+	} while (test_and_set_bit(idx, map));
+
+	return idx;
+}
+
 static inline void __iomem *arm_smmu_page(struct arm_smmu_device *smmu, int n)
 {
 	return smmu->base + (n << smmu->pgshift);
@@ -471,7 +523,9 @@ static inline void arm_smmu_writeq(struct arm_smmu_device *smmu, int page,
 struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu);
 struct arm_smmu_device *nvidia_smmu_impl_init(struct arm_smmu_device *smmu);
 struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu);
+struct arm_smmu_device *qcom_adreno_smmu_impl_init(struct arm_smmu_device *smmu);
 
+void arm_smmu_write_context_bank(struct arm_smmu_device *smmu, int idx);
 int arm_mmu500_reset(struct arm_smmu_device *smmu);
 
 #endif /* _ARM_SMMU_H */
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2020-08-10 22:27 UTC|newest]

Thread overview: 264+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 22:26 [PATCH v12 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation Jordan Crouse
2020-08-10 22:26 ` Jordan Crouse
2020-08-10 22:26 ` Jordan Crouse
2020-08-10 22:26 ` Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 01/13] iommu/arm-smmu: Pass io-pgtable config to implementation specific function Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 02/13] iommu/arm-smmu: Add support for split pagetables Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` Jordan Crouse [this message]
2020-08-10 22:26   ` [PATCH v12 03/13] iommu/arm-smmu: Prepare for the adreno-smmu implementation Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 04/13] iommu: Add a domain attribute to get/set a pagetable configuration Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-13 13:14   ` Will Deacon
2020-08-13 13:14     ` Will Deacon
2020-08-13 15:11     ` [Freedreno] " Rob Clark
2020-08-13 15:11       ` Rob Clark
2020-08-13 15:19       ` Will Deacon
2020-08-13 15:19         ` Will Deacon
2020-08-13 16:28         ` Rob Clark
2020-08-13 16:28           ` Rob Clark
2020-08-10 22:26 ` [PATCH v12 05/13] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-13 13:23   ` Will Deacon
2020-08-13 13:23     ` Will Deacon
2020-08-13 13:23     ` Will Deacon
2020-08-10 22:26 ` [PATCH v12 06/13] dt-bindings: arm-smmu: Add compatible string for Adreno " Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 07/13] drm/msm: Add a context pointer to the submitqueue Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-13 16:17   ` [Freedreno] " Rob Clark
2020-08-13 16:17     ` Rob Clark
2020-08-13 16:17     ` Rob Clark
2020-08-13 17:04   ` Rob Clark
2020-08-13 17:04     ` Rob Clark
2020-08-13 17:04     ` Rob Clark
2020-08-10 22:26 ` [PATCH v12 08/13] drm/msm: Set the global virtual address range from the IOMMU domain Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 09/13] drm/msm: Add support to create a local pagetable Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-23 23:05   ` Guenter Roeck
2020-08-23 23:05     ` Guenter Roeck
2020-08-23 23:05     ` Guenter Roeck
2020-08-10 22:26 ` [PATCH v12 10/13] drm/msm: Add support for private address space instances Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 11/13] drm/msm/a6xx: Add support for per-instance pagetables Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` [PATCH v12 12/13] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26 ` [RFC v12 13/13] iommu/arm-smmu: Add a init_context_bank implementation hook Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-10 22:26   ` Jordan Crouse
2020-08-13 13:03   ` Will Deacon
2020-08-13 13:03     ` Will Deacon
2020-08-13 13:03     ` Will Deacon
2020-08-13 13:19 ` [PATCH v12 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation Will Deacon
2020-08-13 13:19   ` Will Deacon
2020-08-13 13:19   ` Will Deacon
2020-08-13 13:19   ` Will Deacon
2020-08-14  2:40 ` [PATCH 00/19] iommu/arm-smmu + drm/msm: per-process GPU pgtables Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-17 16:51   ` Jordan Crouse
2020-08-17 16:51     ` Jordan Crouse
2020-08-17 16:51     ` Jordan Crouse
2020-08-17 16:51     ` Jordan Crouse
2020-08-14  2:40 ` [PATCH 01/19] drm/msm: remove dangling submitqueue references Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-17 16:51   ` Jordan Crouse
2020-08-17 16:51     ` Jordan Crouse
2020-08-17 16:51     ` Jordan Crouse
2020-08-17 16:51     ` Jordan Crouse
2020-09-01  2:35   ` Bjorn Andersson
2020-09-01  2:35     ` Bjorn Andersson
2020-09-01  2:35     ` Bjorn Andersson
2020-09-01  2:35     ` Bjorn Andersson
2020-09-01  3:42     ` Rob Clark
2020-09-01  3:42       ` Rob Clark
2020-09-01  3:42       ` Rob Clark
2020-09-01  3:42       ` Rob Clark
2020-09-01  5:42       ` Bjorn Andersson
2020-09-01  5:42         ` Bjorn Andersson
2020-09-01  5:42         ` Bjorn Andersson
2020-09-01  5:42         ` Bjorn Andersson
2020-09-01  5:42   ` Bjorn Andersson
2020-09-01  5:42     ` Bjorn Andersson
2020-09-01  5:42     ` Bjorn Andersson
2020-09-01  5:42     ` Bjorn Andersson
2020-08-14  2:40 ` [PATCH 02/19] iommu/arm-smmu: Pass io-pgtable config to implementation specific function Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-09-01  3:36   ` Bjorn Andersson
2020-09-01  3:36     ` Bjorn Andersson
2020-09-01  3:36     ` Bjorn Andersson
2020-09-01  3:36     ` Bjorn Andersson
2020-08-14  2:40 ` [PATCH 03/19] iommu/arm-smmu: Add support for split pagetables Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-09-01  3:41   ` Bjorn Andersson
2020-09-01  3:41     ` Bjorn Andersson
2020-09-01  3:41     ` Bjorn Andersson
2020-09-01  3:41     ` Bjorn Andersson
2020-08-14  2:40 ` [PATCH 04/19] iommu/arm-smmu: Prepare for the adreno-smmu implementation Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:40   ` Rob Clark
2020-08-14  2:41 ` [PATCH 05/19] iommu: add private interface for adreno-smmu Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-17 16:52   ` [Freedreno] " Jordan Crouse
2020-08-17 16:52     ` Jordan Crouse
2020-08-17 16:52     ` Jordan Crouse
2020-08-17 16:52     ` Jordan Crouse
2020-09-01  3:52   ` Bjorn Andersson
2020-09-01  3:52     ` Bjorn Andersson
2020-09-01  3:52     ` Bjorn Andersson
2020-09-01  3:52     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 06/19] drm/msm/gpu: add dev_to_gpu() helper Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-17 16:53   ` [Freedreno] " Jordan Crouse
2020-08-17 16:53     ` Jordan Crouse
2020-08-17 16:53     ` Jordan Crouse
2020-08-17 16:53     ` Jordan Crouse
2020-09-01  4:32   ` Bjorn Andersson
2020-09-01  4:32     ` Bjorn Andersson
2020-09-01  4:32     ` Bjorn Andersson
2020-09-01  4:32     ` Bjorn Andersson
2020-09-01 15:53     ` Rob Clark
2020-09-01 15:53       ` Rob Clark
2020-09-01 15:53       ` Rob Clark
2020-09-01 15:53       ` Rob Clark
2020-08-14  2:41 ` [PATCH 07/19] drm/msm: set adreno_smmu as gpu's drvdata Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-17 16:55   ` Jordan Crouse
2020-08-17 16:55     ` Jordan Crouse
2020-08-17 16:55     ` Jordan Crouse
2020-08-17 16:55     ` Jordan Crouse
2020-09-01  4:58   ` Bjorn Andersson
2020-09-01  4:58     ` Bjorn Andersson
2020-09-01  4:58     ` Bjorn Andersson
2020-09-01  4:58     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 08/19] iommu/arm-smmu: constify some helpers Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  4:56   ` Bjorn Andersson
2020-09-01  4:56     ` Bjorn Andersson
2020-09-01  4:56     ` Bjorn Andersson
2020-09-01  4:56     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 09/19] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:00   ` Bjorn Andersson
2020-09-01  5:00     ` Bjorn Andersson
2020-09-01  5:00     ` Bjorn Andersson
2020-09-01  5:00     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 10/19] dt-bindings: arm-smmu: Add compatible string for Adreno " Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:00   ` Bjorn Andersson
2020-09-01  5:00     ` Bjorn Andersson
2020-09-01  5:00     ` Bjorn Andersson
2020-09-01  5:00     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 11/19] drm/msm: Add a context pointer to the submitqueue Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:05   ` Bjorn Andersson
2020-09-01  5:05     ` Bjorn Andersson
2020-09-01  5:05     ` Bjorn Andersson
2020-09-01  5:05     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 12/19] drm/msm: Drop context arg to gpu->submit() Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:06   ` Bjorn Andersson
2020-09-01  5:06     ` Bjorn Andersson
2020-09-01  5:06     ` Bjorn Andersson
2020-09-01  5:06     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 13/19] drm/msm: Set the global virtual address range from the IOMMU domain Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:23   ` Bjorn Andersson
2020-09-01  5:23     ` Bjorn Andersson
2020-09-01  5:23     ` Bjorn Andersson
2020-09-01  5:23     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 14/19] drm/msm: Add support to create a local pagetable Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:28   ` Bjorn Andersson
2020-09-01  5:28     ` Bjorn Andersson
2020-09-01  5:28     ` Bjorn Andersson
2020-09-01  5:28     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 15/19] drm/msm: Add support for private address space instances Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:30   ` Bjorn Andersson
2020-09-01  5:30     ` Bjorn Andersson
2020-09-01  5:30     ` Bjorn Andersson
2020-09-01  5:30     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 16/19] drm/msm/a6xx: Add support for per-instance pagetables Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-17 15:40   ` Akhil P Oommen
2020-08-17 15:40     ` Akhil P Oommen
2020-08-17 15:40     ` Akhil P Oommen
2020-08-17 15:40     ` Akhil P Oommen
2020-08-17 15:51     ` Rob Clark
2020-08-17 15:51       ` Rob Clark
2020-08-17 15:51       ` Rob Clark
2020-08-17 15:51       ` Rob Clark
2020-08-17 16:47     ` Jordan Crouse
2020-08-17 16:47       ` Jordan Crouse
2020-08-17 16:47       ` Jordan Crouse
2020-08-17 16:47       ` Jordan Crouse
2020-08-14  2:41 ` [PATCH 17/19] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41 ` [PATCH 18/19] iommu/arm-smmu: add a way for implementations to influence SCTLR Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-09-01  5:31   ` Bjorn Andersson
2020-09-01  5:31     ` Bjorn Andersson
2020-09-01  5:31     ` Bjorn Andersson
2020-09-01  5:31     ` Bjorn Andersson
2020-08-14  2:41 ` [PATCH 19/19] drm/msm: show process names in gem_describe Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-14  2:41   ` Rob Clark
2020-08-17 17:14   ` [Freedreno] " Jordan Crouse
2020-08-17 17:14     ` Jordan Crouse
2020-08-17 17:14     ` Jordan Crouse
2020-08-17 17:14     ` Jordan Crouse
2020-09-01  5:35   ` Bjorn Andersson
2020-09-01  5:35     ` Bjorn Andersson
2020-09-01  5:35     ` Bjorn Andersson
2020-09-01  5:35     ` Bjorn Andersson

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=20200810222657.1841322-4-jcrouse@codeaurora.org \
    --to=jcrouse@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hannah@marvell.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jonathan@marek.ca \
    --cc=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicoleotsuka@gmail.com \
    --cc=robin.murphy@arm.com \
    --cc=saiprakash.ranjan@codeaurora.org \
    --cc=swboyd@chromium.org \
    --cc=thierry.reding@gmail.com \
    --cc=vdumpa@nvidia.com \
    --cc=will@kernel.org \
    /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 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.