Skip to content

Commit 5276c1e

Browse files
asahilinajoergroedel
authored andcommitted
iommu/io-pgtable-dart: Only set subpage protection disable for DART 1
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: dc09fe1 ("iommu/io-pgtable-dart: Add DART PTE support for t6000") Signed-off-by: Asahi Lina <[email protected]> Signed-off-by: Sasha Finkelstein <[email protected]> Reviewed-by: Sven Peter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 0ad2507 commit 5276c1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/io-pgtable-dart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ static int dart_init_pte(struct dart_io_pgtable *data,
135135
pte |= FIELD_PREP(APPLE_DART_PTE_SUBPAGE_START, 0);
136136
pte |= FIELD_PREP(APPLE_DART_PTE_SUBPAGE_END, 0xfff);
137137

138-
pte |= APPLE_DART1_PTE_PROT_SP_DIS;
139138
pte |= APPLE_DART_PTE_VALID;
140139

141140
for (i = 0; i < num_entries; i++)
@@ -211,6 +210,7 @@ static dart_iopte dart_prot_to_pte(struct dart_io_pgtable *data,
211210
dart_iopte pte = 0;
212211

213212
if (data->iop.fmt == APPLE_DART) {
213+
pte |= APPLE_DART1_PTE_PROT_SP_DIS;
214214
if (!(prot & IOMMU_WRITE))
215215
pte |= APPLE_DART1_PTE_PROT_NO_WRITE;
216216
if (!(prot & IOMMU_READ))

0 commit comments

Comments
 (0)