Lines Matching refs:devices
104 void dmar_free_dev_scope(struct dmar_dev_scope **devices, int *cnt) in dmar_free_dev_scope() argument
109 if (*devices && *cnt) { in dmar_free_dev_scope()
110 for_each_active_dev_scope(*devices, *cnt, i, tmp_dev) in dmar_free_dev_scope()
112 kfree(*devices); in dmar_free_dev_scope()
115 *devices = NULL; in dmar_free_dev_scope()
213 struct dmar_dev_scope *devices, in dmar_insert_dev_scope() argument
242 for_each_dev_scope(devices, devices_cnt, i, tmp) in dmar_insert_dev_scope()
244 devices[i].bus = info->dev->bus->number; in dmar_insert_dev_scope()
245 devices[i].devfn = info->dev->devfn; in dmar_insert_dev_scope()
246 rcu_assign_pointer(devices[i].dev, in dmar_insert_dev_scope()
257 struct dmar_dev_scope *devices, int count) in dmar_remove_dev_scope() argument
265 for_each_active_dev_scope(devices, count, index, tmp) in dmar_remove_dev_scope()
267 RCU_INIT_POINTER(devices[index].dev, NULL); in dmar_remove_dev_scope()
291 dmaru->devices, dmaru->devices_cnt); in dmar_pci_bus_add_dev()
309 dmaru->devices, dmaru->devices_cnt)) in dmar_pci_bus_del_dev()
370 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
373 if (dmaru->devices_cnt && dmaru->devices == NULL) { in dmar_parse_one_drhd()
380 dmar_free_dev_scope(&dmaru->devices, in dmar_parse_one_drhd()
391 if (dmaru->devices && dmaru->devices_cnt) in dmar_free_drhd()
392 dmar_free_dev_scope(&dmaru->devices, &dmaru->devices_cnt); in dmar_free_drhd()
589 static int dmar_pci_device_match(struct dmar_dev_scope devices[], in dmar_pci_device_match() argument
596 for_each_active_dev_scope(devices, cnt, index, tmp) in dmar_pci_device_match()
625 if (dmar_pci_device_match(dmaru->devices, in dmar_find_matched_drhd_unit()
663 for_each_dev_scope(dmaru->devices, dmaru->devices_cnt, i, tmp) in dmar_acpi_insert_dev_scope()
665 dmaru->devices[i].bus = scope->bus; in dmar_acpi_insert_dev_scope()
666 dmaru->devices[i].devfn = PCI_DEVFN(path->device, in dmar_acpi_insert_dev_scope()
668 rcu_assign_pointer(dmaru->devices[i].dev, in dmar_acpi_insert_dev_scope()