Skip to contentSkip to conversation

iommu/exynos: Fix suspend/resume with IDENTITY domain

PATCH Applied Marek Szyprowski 2 participants 2 messages Apr 1, 2025 – Apr 11, 2025 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20250401202808eucas1p2d2db882c5b7e39bca39e0cf8d7696ca5@eucas1p2.samsung.com

Marek Szyprowski

author maintainer
#1 lore raw

PATCH 1/1 iommu/exynos: Fix suspend/resume with IDENTITY domain

Commit bcb81ac6ae3c ("iommu: Get DT/ACPI parsing into the proper probe path") changed the sequence of probing the SYSMMU controller devices and calls to arm_iommu_attach_device(), what results in resuming SYSMMU controller earlier, when it is still set to IDENTITY mapping. Such change revealed the bug in IDENTITY handling in the exynos-iommu driver. When SYSMMU controller is set to IDENTITY mapping, data->domain is NULL, so adjust checks in suspend & resume callbacks to handle this case correctly.

Fixes b3d14960e629 ("iommu/exynos: Implement an IDENTITY domain")

---
This fixes random issues observed on various ARM 32bit Exynos SoC based boards, like Odroid-XU3.

Best regards
Marek Szyprowski, PhD
Samsung R&D Institute Poland

---
 drivers/iommu/exynos-iommu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/exynos-iommu.c +2 -2
index 69e23e017d9e..317266aca6e2 100644
@@ -832,7 +832,7 @@ static int __maybe_unused exynos_sysmmu_suspend(struct device *dev)
 		struct exynos_iommu_owner *owner = dev_iommu_priv_get(master);
 
 		mutex_lock(&owner->rpm_lock);
-		if (&data->domain->domain != &exynos_identity_domain) {
+		if (data->domain) {
 			dev_dbg(data->sysmmu, "saving state\n");
 			__sysmmu_disable(data);
 		}
@@ -850,7 +850,7 @@ static int __maybe_unused exynos_sysmmu_resume(struct device *dev)
 		struct exynos_iommu_owner *owner = dev_iommu_priv_get(master);
 
 		mutex_lock(&owner->rpm_lock);
-		if (&data->domain->domain != &exynos_identity_domain) {
+		if (data->domain) {
 			dev_dbg(data->sysmmu, "restoring state\n");
 			__sysmmu_enable(data);
 		}
Signature · 1 line
2.34.1
maintainer Applied
#2 lore raw
Quoted 5 lines · Marek Szyprowski
Fixes b3d14960e629 ("iommu/exynos: Implement an IDENTITY domain")

---
This fixes random issues observed on various ARM 32bit Exynos SoC based boards, like Odroid-XU3.

Applied, thanks.