Skip to content

Commit c7bd8a1

Browse files
marcanjoergroedel
authored andcommitted
iommu/apple-dart: Handle DMA_FQ domains in attach_dev()
Commit a4fdd97 ("iommu: Use flush queue capability") hid the IOMMU_DOMAIN_DMA_FQ domain type from domain allocation. A check was introduced in iommu_dma_init_domain() to fall back if not supported, but this check runs too late: by that point, devices have been attached to the IOMMU, and apple-dart's attach_dev() callback does not expect IOMMU_DOMAIN_DMA_FQ domains. Change the logic so the IOMMU_DOMAIN_DMA codepath is the default, instead of explicitly enumerating all types. Fixes an apple-dart regression in v6.5. Cc: [email protected] Cc: [email protected] Suggested-by: Robin Murphy <[email protected]> Fixes: a4fdd97 ("iommu: Use flush queue capability") Signed-off-by: Hector Martin <[email protected]> Reviewed-by: Neal Gompa <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent 7accef5 commit c7bd8a1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/iommu/apple-dart.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,8 +671,7 @@ static int apple_dart_attach_dev(struct iommu_domain *domain,
671671
return ret;
672672

673673
switch (domain->type) {
674-
case IOMMU_DOMAIN_DMA:
675-
case IOMMU_DOMAIN_UNMANAGED:
674+
default:
676675
ret = apple_dart_domain_add_streams(dart_domain, cfg);
677676
if (ret)
678677
return ret;

0 commit comments

Comments
 (0)