Skip to content

Commit 99deffc

Browse files
mszyprowjoergroedel
authored andcommitted
iommu/exynos: Fix suspend/resume with IDENTITY domain
Commit bcb81ac ("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: b3d1496 ("iommu/exynos: Implement an IDENTITY domain") Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20250401202731.2810474-1-m.szyprowski@samsung.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent d9d3ced commit 99deffc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iommu/exynos-iommu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ static int __maybe_unused exynos_sysmmu_suspend(struct device *dev)
832832
struct exynos_iommu_owner *owner = dev_iommu_priv_get(master);
833833

834834
mutex_lock(&owner->rpm_lock);
835-
if (&data->domain->domain != &exynos_identity_domain) {
835+
if (data->domain) {
836836
dev_dbg(data->sysmmu, "saving state\n");
837837
__sysmmu_disable(data);
838838
}
@@ -850,7 +850,7 @@ static int __maybe_unused exynos_sysmmu_resume(struct device *dev)
850850
struct exynos_iommu_owner *owner = dev_iommu_priv_get(master);
851851

852852
mutex_lock(&owner->rpm_lock);
853-
if (&data->domain->domain != &exynos_identity_domain) {
853+
if (data->domain) {
854854
dev_dbg(data->sysmmu, "restoring state\n");
855855
__sysmmu_enable(data);
856856
}

0 commit comments

Comments
 (0)