Lines Matching refs:domain
44 struct dca_domain *domain; in dca_allocate_domain() local
46 domain = kzalloc(sizeof(*domain), GFP_NOWAIT); in dca_allocate_domain()
47 if (!domain) in dca_allocate_domain()
50 INIT_LIST_HEAD(&domain->dca_providers); in dca_allocate_domain()
51 domain->pci_rc = rc; in dca_allocate_domain()
53 return domain; in dca_allocate_domain()
56 static void dca_free_domain(struct dca_domain *domain) in dca_free_domain() argument
58 list_del(&domain->node); in dca_free_domain()
59 kfree(domain); in dca_free_domain()
81 struct dca_domain *domain; in unregister_dca_providers() local
97 domain = list_first_entry(&dca_domains, struct dca_domain, node); in unregister_dca_providers()
99 list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) in unregister_dca_providers()
102 dca_free_domain(domain); in unregister_dca_providers()
114 struct dca_domain *domain; in dca_find_domain() local
116 list_for_each_entry(domain, &dca_domains, node) in dca_find_domain()
117 if (domain->pci_rc == rc) in dca_find_domain()
118 return domain; in dca_find_domain()
126 struct dca_domain *domain; in dca_get_domain() local
129 domain = dca_find_domain(rc); in dca_get_domain()
131 if (!domain) { in dca_get_domain()
136 return domain; in dca_get_domain()
143 struct dca_domain *domain; in dca_find_provider_by_dev() local
147 domain = dca_find_domain(rc); in dca_find_provider_by_dev()
148 if (!domain) in dca_find_provider_by_dev()
152 domain = list_first_entry(&dca_domains, in dca_find_provider_by_dev()
159 list_for_each_entry(dca, &domain->dca_providers, node) in dca_find_provider_by_dev()
176 struct dca_domain *domain; in dca_add_requester() local
191 domain = dca_find_domain(pci_rc); in dca_add_requester()
192 if (!domain) { in dca_add_requester()
197 list_for_each_entry(dca, &domain->dca_providers, node) { in dca_add_requester()
342 struct dca_domain *domain, *newdomain = NULL; in register_dca_provider() local
356 domain = dca_get_domain(dev); in register_dca_provider()
357 if (!domain) { in register_dca_provider()
374 domain = dca_get_domain(dev); in register_dca_provider()
375 if (!domain) { in register_dca_provider()
376 domain = newdomain; in register_dca_provider()
378 list_add(&domain->node, &dca_domains); in register_dca_provider()
381 list_add(&dca->node, &domain->dca_providers); in register_dca_provider()
399 struct dca_domain *domain; in unregister_dca_provider() local
414 domain = dca_find_domain(pci_rc); in unregister_dca_provider()
415 if (list_empty(&domain->dca_providers)) in unregister_dca_provider()
416 dca_free_domain(domain); in unregister_dca_provider()