diff mbox series

iommu/arm-smmu: Update impl quirks comment

Message ID 1e742177e084621f3454fbaf768325a6c215656a.1592994291.git.robin.murphy@arm.com (mailing list archive)
State Mainlined
Commit 976492922a6a9c06f6f61436848adf2f03702e5c
Headers show
Series iommu/arm-smmu: Update impl quirks comment | expand

Commit Message

Robin Murphy June 24, 2020, 10:24 a.m. UTC
The comment about implementation and integration quirks being
mutually-exclusive is out of date, and in fact the code is already
structured for the case it anticipates, so document that properly.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 drivers/iommu/arm-smmu-impl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Will Deacon July 8, 2020, 10:02 p.m. UTC | #1
On Wed, 24 Jun 2020 11:24:51 +0100, Robin Murphy wrote:
> The comment about implementation and integration quirks being
> mutually-exclusive is out of date, and in fact the code is already
> structured for the case it anticipates, so document that properly.

Applied to will (for-joerg/arm-smmu/updates), thanks!

[1/1] iommu/arm-smmu: Update impl quirks comment
      https://git.kernel.org/will/c/976492922a6a

Cheers,
diff mbox series

Patch

diff --git a/drivers/iommu/arm-smmu-impl.c b/drivers/iommu/arm-smmu-impl.c
index c75b9d957b70..1fb4bb994dbf 100644
--- a/drivers/iommu/arm-smmu-impl.c
+++ b/drivers/iommu/arm-smmu-impl.c
@@ -153,10 +153,9 @@  struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu)
 	const struct device_node *np = smmu->dev->of_node;
 
 	/*
-	 * We will inevitably have to combine model-specific implementation
-	 * quirks with platform-specific integration quirks, but everything
-	 * we currently support happens to work out as straightforward
-	 * mutually-exclusive assignments.
+	 * Set the impl for model-specific implementation quirks first,
+	 * such that platform integration quirks can pick it up and
+	 * inherit from it if necessary.
 	 */
 	switch (smmu->model) {
 	case ARM_MMU500:
@@ -168,6 +167,7 @@  struct arm_smmu_device *arm_smmu_impl_init(struct arm_smmu_device *smmu)
 		break;
 	}
 
+	/* This is implicitly MMU-400 */
 	if (of_property_read_bool(np, "calxeda,smmu-secure-config-access"))
 		smmu->impl = &calxeda_impl;