Linux IOMMU Development
 help / color / mirror / Atom feed
From: Daniel Mentz <danielmentz@google.com>
To: iommu@lists.linux.dev
Cc: Nicolin Chen <nicolinc@nvidia.com>,
	Robin Murphy <robin.murphy@arm.com>,
	 Daniel Mentz <danielmentz@google.com>
Subject: [PATCH] iommu/arm-smmu-v3: Skip prefetch cmd for MMU-600, MMU-700
Date: Mon, 13 May 2024 14:54:20 -0700	[thread overview]
Message-ID: <20240513215420.408374-1-danielmentz@google.com> (raw)

Arm CoreLink MMU-600 and MMU-700 both silently ignore the
CMD_PREFETCH_CONFIG command. Let's not waste cycles adding this command to
the command queue if it is ignored anyway.

Signed-off-by: Daniel Mentz <danielmentz@google.com>
---
 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index aa62f0ecd053..98f1c4b44ef3 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -3684,6 +3684,8 @@ static void arm_smmu_device_iidr_probe(struct arm_smmu_device *smmu)
 	case IIDR_IMPLEMENTER_ARM:
 		switch (productid) {
 		case IIDR_PRODUCTID_ARM_MMU_600:
+			/* MMU-600 silently ignores CMD_PREFETCH_CONFIG */
+			smmu->options |= ARM_SMMU_OPT_SKIP_PREFETCH;
 			/* Arm erratum 1076982 */
 			if (variant == 0 && revision <= 2)
 				smmu->features &= ~ARM_SMMU_FEAT_SEV;
@@ -3692,6 +3694,8 @@ static void arm_smmu_device_iidr_probe(struct arm_smmu_device *smmu)
 				smmu->features &= ~ARM_SMMU_FEAT_NESTING;
 			break;
 		case IIDR_PRODUCTID_ARM_MMU_700:
+			/* MMU-700 silently ignores CMD_PREFETCH_CONFIG */
+			smmu->options |= ARM_SMMU_OPT_SKIP_PREFETCH;
 			/* Arm erratum 2812531 */
 			smmu->features &= ~ARM_SMMU_FEAT_BTM;
 			smmu->options |= ARM_SMMU_OPT_CMDQ_FORCE_SYNC;
-- 
2.45.0.118.g7fe29c98d7-goog


             reply	other threads:[~2024-05-13 21:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-13 21:54 Daniel Mentz [this message]
2024-05-15 15:29 ` [PATCH] iommu/arm-smmu-v3: Skip prefetch cmd for MMU-600, MMU-700 Robin Murphy
2024-05-21 17:49   ` Daniel Mentz

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=20240513215420.408374-1-danielmentz@google.com \
    --to=danielmentz@google.com \
    --cc=iommu@lists.linux.dev \
    --cc=nicolinc@nvidia.com \
    --cc=robin.murphy@arm.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