Lines Matching refs:devices
113 void dmar_free_dev_scope(struct dmar_dev_scope **devices, int *cnt) in dmar_free_dev_scope() argument
118 if (*devices && *cnt) { in dmar_free_dev_scope()
119 for_each_active_dev_scope(*devices, *cnt, i, tmp_dev) in dmar_free_dev_scope()
121 kfree(*devices); in dmar_free_dev_scope()
124 *devices = NULL; in dmar_free_dev_scope()
222 struct dmar_dev_scope *devices, in dmar_insert_dev_scope() argument
251 for_each_dev_scope(devices, devices_cnt, i, tmp) in dmar_insert_dev_scope()
253 devices[i].bus = info->dev->bus->number; in dmar_insert_dev_scope()
254 devices[i].devfn = info->dev->devfn; in dmar_insert_dev_scope()
255 rcu_assign_pointer(devices[i].dev, in dmar_insert_dev_scope()
266 struct dmar_dev_scope *devices, int count) in dmar_remove_dev_scope() argument
274 for_each_active_dev_scope(devices, count, index, tmp) in dmar_remove_dev_scope()
276 RCU_INIT_POINTER(devices[index].dev, NULL); in dmar_remove_dev_scope()
300 dmaru->devices, dmaru->devices_cnt); in dmar_pci_bus_add_dev()
318 dmaru->devices, dmaru->devices_cnt)) in dmar_pci_bus_del_dev()
399 dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1), in dmar_parse_one_drhd()
402 if (dmaru->devices_cnt && dmaru->devices == NULL) { in dmar_parse_one_drhd()
409 dmar_free_dev_scope(&dmaru->devices, in dmar_parse_one_drhd()
425 if (dmaru->devices && dmaru->devices_cnt) in dmar_free_drhd()
426 dmar_free_dev_scope(&dmaru->devices, &dmaru->devices_cnt); in dmar_free_drhd()
639 static int dmar_pci_device_match(struct dmar_dev_scope devices[], in dmar_pci_device_match() argument
646 for_each_active_dev_scope(devices, cnt, index, tmp) in dmar_pci_device_match()
675 if (dmar_pci_device_match(dmaru->devices, in dmar_find_matched_drhd_unit()
713 for_each_dev_scope(dmaru->devices, dmaru->devices_cnt, i, tmp) in dmar_acpi_insert_dev_scope()
715 dmaru->devices[i].bus = scope->bus; in dmar_acpi_insert_dev_scope()
716 dmaru->devices[i].devfn = PCI_DEVFN(path->device, in dmar_acpi_insert_dev_scope()
718 rcu_assign_pointer(dmaru->devices[i].dev, in dmar_acpi_insert_dev_scope()
1861 if (!dmaru->include_all && dmaru->devices && dmaru->devices_cnt) in dmar_hp_remove_drhd()
1862 for_each_active_dev_scope(dmaru->devices, in dmar_hp_remove_drhd()