iommu/vt-d: Fix panic accessing amd_iommu_enable_faulting
Subsystems (2)
PATCH 1/1 iommu/vt-d: Fix panic accessing amd_iommu_enable_faulting
This fixes a bug introduced by commit d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally"). The panic happens when amd_iommu_enable_faulting is called from CPUHP_AP_ONLINE_DYN context.
Signed-off-by Dimitri Sivanich <[email protected]>
Tested-by Yi Zhang <[email protected]>
--- drivers/iommu/amd/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/amd/init.c +1 -1
@@ -3353,7 +3353,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 ;
Signature · 1 line
2.35.3
Vasant Hegde
maintainerHi Dimitri,
Quoted 3 lines · Dimitri Sivanich
This fixes a bug introduced by commit
d74169ceb0d2("iommu/vt-d: Allocate DMAR fault interrupts locally"). The panic happens whenamd_iommu_enable_faultingis called fromCPUHP_AP_ONLINE_DYNcontext.
Issue is happening on AMD system. Can you please change subject line. s/vt-d/amd/ ?
Also may be add "Fixes" tag as well.
-Vasant
Quoted 20 lines
Signed-off-by Dimitri Sivanich <[email protected]>Tested-by Yi Zhang <[email protected]>--- drivers/iommu/amd/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/iommu/amd/init.c +1
-1@@ -3353,7 +3353,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 ;