Skip to content

Commit b9cc1e8

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 a05588f commit b9cc1e8

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
@@ -906,8 +906,12 @@ static int apple_dart_def_domain_type(struct device *dev)
906906
struct apple_dart_master_cfg *cfg = dev_iommu_priv_get(dev);
907907
struct apple_dart *dart = cfg->stream_maps[0].dart;
908908

909+
WARN_ON(dart->force_bypass && dart->locked);
910+
909911
if (dart->force_bypass)
910912
return IOMMU_DOMAIN_IDENTITY;
913+
if (dart->locked)
914+
return IOMMU_DOMAIN_DMA;
911915
if (dart->supports_bypass)
912916
return IOMMU_DOMAIN_DMA;
913917

0 commit comments

Comments
 (0)