Skip to content

Commit 3f6eead

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Do not try copy old DTE resume path
In suspend/resume path, no need to copy old DTE (early_enable_iommus()). Just need to reload IOMMU hardware. This is the side effect of commit 3ac3e5e ("iommu/amd: Copy old trans table from old kernel") which changed early_enable_iommus() but missed to fix enable_iommus(). Resume path continue to work as 'amd_iommu_pre_enabled' is set to false and copy_device_table() will fail. It will just re-loaded IOMMU. Hence I think we don't need to backport this to stable tree. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Link: https://lore.kernel.org/r/20241016084958.99727-1-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 5ce73c5 commit 3f6eead

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/iommu/amd/init.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2882,11 +2882,6 @@ static void enable_iommus_vapic(void)
28822882
#endif
28832883
}
28842884

2885-
static void enable_iommus(void)
2886-
{
2887-
early_enable_iommus();
2888-
}
2889-
28902885
static void disable_iommus(void)
28912886
{
28922887
struct amd_iommu *iommu;
@@ -2913,7 +2908,8 @@ static void amd_iommu_resume(void)
29132908
iommu_apply_resume_quirks(iommu);
29142909

29152910
/* re-load the hardware */
2916-
enable_iommus();
2911+
for_each_iommu(iommu)
2912+
early_enable_iommu(iommu);
29172913

29182914
amd_iommu_enable_interrupts();
29192915
}

0 commit comments

Comments
 (0)