Merge: [RHEL9.5] iommu/amd: Fix panic accessing amd_iommu_enable_faulting

MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4452

# Merge Request Required Information

JIRA: https://issues.redhat.com/browse/RHEL-40344  
JIRA: https://issues.redhat.com/browse/RHEL-37320  
Upstream Status: Posted: https://lore.kernel.org/linux-iommu/ZljHE%2FR4KLzGU6vx@hpe.com/  
Tested: Reproduced and verified fix on amd system in beaker by taking cpu offline and back online.  

## Summary of Changes

Remove __init annotation from amd_iommu_enable_faulting now that it can be called during cpu hotplug.

Note: Joerg hasn't pulled this into his tree yet, but it is very straightforward and I would like to get it in asap to avoid trouble for others with cpu hotplug tests.

Signed-off-by: Jerry Snitselaar <jsnitsel@redhat.com>

## Approved Development Ticket
All submissions to CentOS Stream must reference an approved ticket in [Red Hat Jira](https://issues.redhat.com/). Please follow the CentOS Stream [contribution documentation](https://docs.centos.org/en-US/stream-contrib/quickstart/) for how to file this ticket and have it approved.

Approved-by: Donald Dutile <ddutile@redhat.com>
Approved-by: Phil Auld <pauld@redhat.com>
Approved-by: Luis Claudio R. Goncalves <lgoncalv@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>

Merged-by: Lucas Zampieri <lzampier@redhat.com>
This commit is contained in:
Lucas Zampieri 2024-06-17 13:03:35 +00:00
commit 1de4e8fa97
1 changed files with 1 additions and 1 deletions

View File

@ -3324,7 +3324,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;