Commit 12243a81 authored by Dimitri Sivanich's avatar Dimitri Sivanich Committed by Joerg Roedel

iommu/amd: Fix panic accessing amd_iommu_enable_faulting

This fixes a bug introduced by commit d74169ce ("iommu/vt-d: Allocate
DMAR fault interrupts locally").  The panic happens when
amd_iommu_enable_faulting is called from CPUHP_AP_ONLINE_DYN context.

Fixes: d74169ce ("iommu/vt-d: Allocate DMAR fault interrupts locally")
Signed-off-by: default avatarDimitri Sivanich <sivanich@hpe.com>
Tested-by: default avatarYi Zhang <yi.zhang@redhat.com>
Reviewed-by: default avatarJerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: default avatarVasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/ZljHE/R4KLzGU6vx@hpe.comSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 83a7eefe
......@@ -3362,7 +3362,7 @@ int amd_iommu_reenable(int mode)
return 0;
}
int __init amd_iommu_enable_faulting(unsigned int cpu)
int amd_iommu_enable_faulting(unsigned int cpu)
{
/* We enable MSI later when PCI is initialized */
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment