Skip to content

Commit 3ee165b

Browse files
alyssarosenzweigmarcan
authored andcommitted
iommu/dart: Set DMA domain for locked DARTs
This is required. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
1 parent d8690b5 commit 3ee165b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

drivers/iommu/apple-dart.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,8 +908,12 @@ static int apple_dart_def_domain_type(struct device *dev)
908908
struct apple_dart_master_cfg *cfg = dev_iommu_priv_get(dev);
909909
struct apple_dart *dart = cfg->stream_maps[0].dart;
910910

911+
WARN_ON(dart->force_bypass && dart->locked);
912+
911913
if (dart->force_bypass)
912914
return IOMMU_DOMAIN_IDENTITY;
915+
if (dart->locked)
916+
return IOMMU_DOMAIN_DMA;
913917
if (dart->supports_bypass)
914918
return IOMMU_DOMAIN_DMA;
915919

0 commit comments

Comments
 (0)