diff options
author | Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> | 2022-07-13 17:56:45 -0500 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-07-15 10:41:02 +0200 |
commit | 9dd299d8c6cd9cd50fe49c067a82f091df87565f (patch) | |
tree | 7c60fcce841cb8b68835d2da21066e3cf0fef165 /drivers/iommu/amd/amd_iommu.h | |
parent | 1e98a35da49ee7d5b0d101518da51a109a02f238 (diff) | |
download | linux-9dd299d8c6cd9cd50fe49c067a82f091df87565f.tar.bz2 |
iommu/amd: Introduce global variable for storing common EFR and EFR2
Some IOMMU features require that all IOMMUs must support the feature,
which is determined by checking the support bit in the Extended Feature
Register 1 and 2 (EFR/EFR2) on all IOMMUs. This check is done by the
function check_feature_on_all_iommus(), which iterates through all
IOMMUs everytime it is called.
Instead, introduce a global variable to store common EFR/EFR2 among all
IOMMUs. In case of inconsistent EFR/EFR2 masks are detected on an IOMMU,
a FW_BUG warning is reported.
Suggested-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20220713225651.20758-4-suravee.suthikulpanit@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd/amd_iommu.h')
-rw-r--r-- | drivers/iommu/amd/amd_iommu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/iommu/amd/amd_iommu.h b/drivers/iommu/amd/amd_iommu.h index 9b7092182ca7..1b945d47741c 100644 --- a/drivers/iommu/amd/amd_iommu.h +++ b/drivers/iommu/amd/amd_iommu.h @@ -137,4 +137,7 @@ static inline void amd_iommu_apply_ivrs_quirks(void) { } extern void amd_iommu_domain_set_pgtable(struct protection_domain *domain, u64 *root, int mode); extern struct dev_table_entry *get_dev_table(struct amd_iommu *iommu); + +extern u64 amd_iommu_efr; +extern u64 amd_iommu_efr2; #endif |