File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,14 @@ static inline bool check_feature2(u64 mask)
118
118
return (amd_iommu_efr2 & mask );
119
119
}
120
120
121
+ static inline bool amd_iommu_v2_pgtbl_supported (void )
122
+ {
123
+ return (check_feature (FEATURE_GIOSUP ) && check_feature (FEATURE_GT ));
124
+ }
125
+
121
126
static inline bool amd_iommu_gt_ppr_supported (void )
122
127
{
123
- return (check_feature ( FEATURE_GT ) &&
128
+ return (amd_iommu_v2_pgtbl_supported ( ) &&
124
129
check_feature (FEATURE_PPR ) &&
125
130
check_feature (FEATURE_EPHSUP ));
126
131
}
Original file line number Diff line number Diff line change @@ -2071,8 +2071,7 @@ static int __init iommu_init_pci(struct amd_iommu *iommu)
2071
2071
init_iommu_perf_ctr (iommu );
2072
2072
2073
2073
if (amd_iommu_pgtable == AMD_IOMMU_V2 ) {
2074
- if (!check_feature (FEATURE_GIOSUP ) ||
2075
- !check_feature (FEATURE_GT )) {
2074
+ if (!amd_iommu_v2_pgtbl_supported ()) {
2076
2075
pr_warn ("Cannot enable v2 page table for DMA-API. Fallback to v1.\n" );
2077
2076
amd_iommu_pgtable = AMD_IOMMU_V1 ;
2078
2077
}
You can’t perform that action at this time.
0 commit comments