Skip to contentSkip to conversation

Patch "iommu/apple-dart: Handle DMA_FQ domains in attach_dev()" has been added to the 6.5-stable tree

PATCH [email protected] 1 participant 1 message Oct 7, 2023

Subsystems (3)
lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iommu/apple-dart: Handle DMA_FQ domains in attach_dev()

to the 6.5-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
iommu-apple-dart-handle-dma_fq-domains-in-attach_dev.patch
and it can be found in the queue-6.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From c7bd8a1f45bada7725d11266df7fd5cb549b3098 Mon Sep 17 00:00:00 2001
From: Hector Martin <[email protected]>
Date: Fri, 22 Sep 2023 23:55:23 +0900
Subject: iommu/apple-dart: Handle DMA_FQ domains in attach_dev()

From: Hector Martin <[email protected]>

commit c7bd8a1f45bada7725d11266df7fd5cb549b3098 upstream.

Commit a4fdd9762272 ("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.

---
 drivers/iommu/apple-dart.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/iommu/apple-dart.c +1 -2
index 2082081402d3..0b8927508427 100644
@@ -671,8 +671,7 @@ static int apple_dart_attach_dev(struct iommu_domain *domain,
 		return ret;
 
 	switch (domain->type) {
-	case IOMMU_DOMAIN_DMA:
-	case IOMMU_DOMAIN_UNMANAGED:
+	default:
 		ret = apple_dart_domain_add_streams(dart_domain, cfg);
 		if (ret)
 			return ret;
Signature · 7 lines
2.42.0



Patches currently in stable-queue which might be from [email protected] are

queue-6.5/iommu-apple-dart-handle-dma_fq-domains-in-attach_dev.patch