]> www.infradead.org Git - nvme.git/commitdiff
iommu/amd: Fix panic accessing amd_iommu_enable_faulting
authorDimitri Sivanich <sivanich@hpe.com>
Thu, 30 May 2024 18:36:03 +0000 (13:36 -0500)
committerJoerg Roedel <jroedel@suse.de>
Thu, 13 Jun 2024 09:16:05 +0000 (11:16 +0200)
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.

Fixes: d74169ceb0d2 ("iommu/vt-d: Allocate DMAR fault interrupts locally")
Signed-off-by: Dimitri Sivanich <sivanich@hpe.com>
Tested-by: Yi Zhang <yi.zhang@redhat.com>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Reviewed-by: Vasant Hegde <vasant.hegde@amd.com>
Link: https://lore.kernel.org/r/ZljHE/R4KLzGU6vx@hpe.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/init.c

index 27e2937270950bf3066f0759248c4eefba43e62a..161248067776470fbf10981ddda892d5aef09b8c 100644 (file)
@@ -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;