File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -578,7 +578,6 @@ struct protection_domain {
578
578
u16 id ; /* the domain id written to the device table */
579
579
enum protection_domain_mode pd_mode ; /* Track page table type */
580
580
bool dirty_tracking ; /* dirty tracking is enabled in the domain */
581
- unsigned dev_cnt ; /* devices assigned to this domain */
582
581
unsigned dev_iommu [MAX_IOMMUS ]; /* per-IOMMU reference count */
583
582
584
583
struct mmu_notifier mn ; /* mmu notifier for the SVA domain */
Original file line number Diff line number Diff line change @@ -2031,7 +2031,6 @@ static int do_attach(struct iommu_dev_data *dev_data,
2031
2031
2032
2032
/* Do reference counting */
2033
2033
domain -> dev_iommu [iommu -> index ] += 1 ;
2034
- domain -> dev_cnt += 1 ;
2035
2034
2036
2035
/* Setup GCR3 table */
2037
2036
if (pdom_is_sva_capable (domain )) {
@@ -2064,7 +2063,6 @@ static void do_detach(struct iommu_dev_data *dev_data)
2064
2063
2065
2064
/* decrease reference counters - needs to happen after the flushes */
2066
2065
domain -> dev_iommu [iommu -> index ] -= 1 ;
2067
- domain -> dev_cnt -= 1 ;
2068
2066
}
2069
2067
2070
2068
/*
@@ -2237,16 +2235,13 @@ static void cleanup_domain(struct protection_domain *domain)
2237
2235
2238
2236
lockdep_assert_held (& domain -> lock );
2239
2237
2240
- if (!domain -> dev_cnt )
2241
- return ;
2242
-
2243
2238
while (!list_empty (& domain -> dev_list )) {
2244
2239
entry = list_first_entry (& domain -> dev_list ,
2245
2240
struct iommu_dev_data , list );
2246
2241
BUG_ON (!entry -> domain );
2247
2242
do_detach (entry );
2248
2243
}
2249
- WARN_ON (domain -> dev_cnt != 0 );
2244
+ WARN_ON (! list_empty ( & domain -> dev_list ) );
2250
2245
}
2251
2246
2252
2247
void protection_domain_free (struct protection_domain * domain )
You can’t perform that action at this time.
0 commit comments