public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iommu/io-pgtable-dart: Only set subpage protection disable for DART 1
@ 2025-02-19  9:13 Sasha Finkelstein via B4 Relay
  2025-02-19 15:39 ` Sven Peter
  2025-02-21 11:07 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Sasha Finkelstein via B4 Relay @ 2025-02-19  9:13 UTC (permalink / raw)
  To: Sven Peter, Alyssa Rosenzweig, Joerg Roedel, Will Deacon,
	Robin Murphy, Hector Martin, Rob Herring, Janne Grunau
  Cc: Joerg Roedel, asahi, linux-arm-kernel, iommu, linux-kernel,
	Asahi Lina, Sasha Finkelstein

From: Asahi Lina <lina@asahilina.net>

Subpage protection can't be disabled on t6000-style darts,
as such the disable flag no longer applies, and probably
even affects something else.

Fixes: dc09fe1c5edd ("iommu/io-pgtable-dart: Add DART PTE support for t6000")
Signed-off-by: Asahi Lina <lina@asahilina.net>
Signed-off-by: Sasha Finkelstein <fnkl.kernel@gmail.com>
---
 drivers/iommu/io-pgtable-dart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/io-pgtable-dart.c b/drivers/iommu/io-pgtable-dart.c
index c004640640ee50d01dd54c38e89162c0fcb1988f..06aca9ab52f9a811a2608ae75155a36919799c74 100644
--- a/drivers/iommu/io-pgtable-dart.c
+++ b/drivers/iommu/io-pgtable-dart.c
@@ -135,7 +135,6 @@ static int dart_init_pte(struct dart_io_pgtable *data,
 	pte |= FIELD_PREP(APPLE_DART_PTE_SUBPAGE_START, 0);
 	pte |= FIELD_PREP(APPLE_DART_PTE_SUBPAGE_END, 0xfff);
 
-	pte |= APPLE_DART1_PTE_PROT_SP_DIS;
 	pte |= APPLE_DART_PTE_VALID;
 
 	for (i = 0; i < num_entries; i++)
@@ -211,6 +210,7 @@ static dart_iopte dart_prot_to_pte(struct dart_io_pgtable *data,
 	dart_iopte pte = 0;
 
 	if (data->iop.fmt == APPLE_DART) {
+		pte |= APPLE_DART1_PTE_PROT_SP_DIS;
 		if (!(prot & IOMMU_WRITE))
 			pte |= APPLE_DART1_PTE_PROT_NO_WRITE;
 		if (!(prot & IOMMU_READ))

---
base-commit: 2408a807bfc3f738850ef5ad5e3fd59d66168996
change-id: 20250219-dart2-no-sp-disable-f35072cbbd96



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

end of thread, other threads:[~2025-02-21 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19  9:13 [PATCH] iommu/io-pgtable-dart: Only set subpage protection disable for DART 1 Sasha Finkelstein via B4 Relay
2025-02-19 15:39 ` Sven Peter
2025-02-21 11:07 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox