File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -3113,24 +3113,6 @@ static ssize_t iommu_group_store_type(struct iommu_group *group,
3113
3113
return ret ?: count ;
3114
3114
}
3115
3115
3116
- static bool iommu_is_default_domain (struct iommu_group * group )
3117
- {
3118
- if (group -> domain == group -> default_domain )
3119
- return true;
3120
-
3121
- /*
3122
- * If the default domain was set to identity and it is still an identity
3123
- * domain then we consider this a pass. This happens because of
3124
- * amd_iommu_init_device() replacing the default idenytity domain with an
3125
- * identity domain that has a different configuration for AMDGPU.
3126
- */
3127
- if (group -> default_domain &&
3128
- group -> default_domain -> type == IOMMU_DOMAIN_IDENTITY &&
3129
- group -> domain && group -> domain -> type == IOMMU_DOMAIN_IDENTITY )
3130
- return true;
3131
- return false;
3132
- }
3133
-
3134
3116
/**
3135
3117
* iommu_device_use_default_domain() - Device driver wants to handle device
3136
3118
* DMA through the kernel DMA API.
@@ -3149,7 +3131,7 @@ int iommu_device_use_default_domain(struct device *dev)
3149
3131
3150
3132
mutex_lock (& group -> mutex );
3151
3133
if (group -> owner_cnt ) {
3152
- if (group -> owner || ! iommu_is_default_domain ( group ) ||
3134
+ if (group -> domain != group -> default_domain || group -> owner ||
3153
3135
!xa_empty (& group -> pasid_array )) {
3154
3136
ret = - EBUSY ;
3155
3137
goto unlock_out ;
You can’t perform that action at this time.
0 commit comments