dmaru             298 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru             301 drivers/iommu/dmar.c 	for_each_drhd_unit(dmaru) {
dmaru             302 drivers/iommu/dmar.c 		if (dmaru->include_all)
dmaru             305 drivers/iommu/dmar.c 		drhd = container_of(dmaru->hdr,
dmaru             309 drivers/iommu/dmar.c 				dmaru->segment,
dmaru             310 drivers/iommu/dmar.c 				dmaru->devices, dmaru->devices_cnt);
dmaru             324 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru             326 drivers/iommu/dmar.c 	for_each_drhd_unit(dmaru)
dmaru             327 drivers/iommu/dmar.c 		if (dmar_remove_dev_scope(info, dmaru->segment,
dmaru             328 drivers/iommu/dmar.c 			dmaru->devices, dmaru->devices_cnt))
dmaru             372 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru             374 drivers/iommu/dmar.c 	list_for_each_entry_rcu(dmaru, &dmar_drhd_units, list,
dmaru             376 drivers/iommu/dmar.c 		if (dmaru->segment == drhd->segment &&
dmaru             377 drivers/iommu/dmar.c 		    dmaru->reg_base_addr == drhd->address)
dmaru             378 drivers/iommu/dmar.c 			return dmaru;
dmaru             391 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru             395 drivers/iommu/dmar.c 	dmaru = dmar_find_dmaru(drhd);
dmaru             396 drivers/iommu/dmar.c 	if (dmaru)
dmaru             399 drivers/iommu/dmar.c 	dmaru = kzalloc(sizeof(*dmaru) + header->length, GFP_KERNEL);
dmaru             400 drivers/iommu/dmar.c 	if (!dmaru)
dmaru             407 drivers/iommu/dmar.c 	dmaru->hdr = (void *)(dmaru + 1);
dmaru             408 drivers/iommu/dmar.c 	memcpy(dmaru->hdr, header, header->length);
dmaru             409 drivers/iommu/dmar.c 	dmaru->reg_base_addr = drhd->address;
dmaru             410 drivers/iommu/dmar.c 	dmaru->segment = drhd->segment;
dmaru             411 drivers/iommu/dmar.c 	dmaru->include_all = drhd->flags & 0x1; /* BIT0: INCLUDE_ALL */
dmaru             412 drivers/iommu/dmar.c 	dmaru->devices = dmar_alloc_dev_scope((void *)(drhd + 1),
dmaru             414 drivers/iommu/dmar.c 					      &dmaru->devices_cnt);
dmaru             415 drivers/iommu/dmar.c 	if (dmaru->devices_cnt && dmaru->devices == NULL) {
dmaru             416 drivers/iommu/dmar.c 		kfree(dmaru);
dmaru             420 drivers/iommu/dmar.c 	ret = alloc_iommu(dmaru);
dmaru             422 drivers/iommu/dmar.c 		dmar_free_dev_scope(&dmaru->devices,
dmaru             423 drivers/iommu/dmar.c 				    &dmaru->devices_cnt);
dmaru             424 drivers/iommu/dmar.c 		kfree(dmaru);
dmaru             427 drivers/iommu/dmar.c 	dmar_register_drhd_unit(dmaru);
dmaru             436 drivers/iommu/dmar.c static void dmar_free_drhd(struct dmar_drhd_unit *dmaru)
dmaru             438 drivers/iommu/dmar.c 	if (dmaru->devices && dmaru->devices_cnt)
dmaru             439 drivers/iommu/dmar.c 		dmar_free_dev_scope(&dmaru->devices, &dmaru->devices_cnt);
dmaru             440 drivers/iommu/dmar.c 	if (dmaru->iommu)
dmaru             441 drivers/iommu/dmar.c 		free_iommu(dmaru->iommu);
dmaru             442 drivers/iommu/dmar.c 	kfree(dmaru);
dmaru             674 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru             680 drivers/iommu/dmar.c 	for_each_drhd_unit(dmaru) {
dmaru             681 drivers/iommu/dmar.c 		drhd = container_of(dmaru->hdr,
dmaru             685 drivers/iommu/dmar.c 		if (dmaru->include_all &&
dmaru             689 drivers/iommu/dmar.c 		if (dmar_pci_device_match(dmaru->devices,
dmaru             690 drivers/iommu/dmar.c 					  dmaru->devices_cnt, dev))
dmaru             693 drivers/iommu/dmar.c 	dmaru = NULL;
dmaru             697 drivers/iommu/dmar.c 	return dmaru;
dmaru             703 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru             710 drivers/iommu/dmar.c 	for_each_drhd_unit(dmaru) {
dmaru             711 drivers/iommu/dmar.c 		drhd = container_of(dmaru->hdr,
dmaru             725 drivers/iommu/dmar.c 				dev_name(&adev->dev), dmaru->reg_base_addr,
dmaru             727 drivers/iommu/dmar.c 			for_each_dev_scope(dmaru->devices, dmaru->devices_cnt, i, tmp)
dmaru             729 drivers/iommu/dmar.c 					dmaru->devices[i].bus = scope->bus;
dmaru             730 drivers/iommu/dmar.c 					dmaru->devices[i].devfn = PCI_DEVFN(path->device,
dmaru             732 drivers/iommu/dmar.c 					rcu_assign_pointer(dmaru->devices[i].dev,
dmaru             736 drivers/iommu/dmar.c 			BUG_ON(i >= dmaru->devices_cnt);
dmaru            1884 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru, *dmaru_n;
dmaru            1893 drivers/iommu/dmar.c 	list_for_each_entry_safe(dmaru, dmaru_n, &dmar_drhd_units, list) {
dmaru            1894 drivers/iommu/dmar.c 		list_del(&dmaru->list);
dmaru            1895 drivers/iommu/dmar.c 		dmar_free_drhd(dmaru);
dmaru            1964 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru            1966 drivers/iommu/dmar.c 	dmaru = dmar_find_dmaru((struct acpi_dmar_hardware_unit *)header);
dmaru            1967 drivers/iommu/dmar.c 	if (!dmaru)
dmaru            1970 drivers/iommu/dmar.c 	ret = dmar_ir_hotplug(dmaru, true);
dmaru            1972 drivers/iommu/dmar.c 		ret = dmar_iommu_hotplug(dmaru, true);
dmaru            1981 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru            1983 drivers/iommu/dmar.c 	dmaru = dmar_find_dmaru((struct acpi_dmar_hardware_unit *)header);
dmaru            1984 drivers/iommu/dmar.c 	if (!dmaru)
dmaru            1990 drivers/iommu/dmar.c 	if (!dmaru->include_all && dmaru->devices && dmaru->devices_cnt) {
dmaru            1991 drivers/iommu/dmar.c 		for_each_active_dev_scope(dmaru->devices,
dmaru            1992 drivers/iommu/dmar.c 					  dmaru->devices_cnt, i, dev)
dmaru            1996 drivers/iommu/dmar.c 	ret = dmar_ir_hotplug(dmaru, false);
dmaru            1998 drivers/iommu/dmar.c 		ret = dmar_iommu_hotplug(dmaru, false);
dmaru            2005 drivers/iommu/dmar.c 	struct dmar_drhd_unit *dmaru;
dmaru            2007 drivers/iommu/dmar.c 	dmaru = dmar_find_dmaru((struct acpi_dmar_hardware_unit *)header);
dmaru            2008 drivers/iommu/dmar.c 	if (dmaru) {
dmaru            2009 drivers/iommu/dmar.c 		list_del_rcu(&dmaru->list);
dmaru            2011 drivers/iommu/dmar.c 		dmar_free_drhd(dmaru);
dmaru            4435 drivers/iommu/intel-iommu.c static int intel_iommu_add(struct dmar_drhd_unit *dmaru)
dmaru            4438 drivers/iommu/intel-iommu.c 	struct intel_iommu *iommu = dmaru->iommu;
dmaru            4479 drivers/iommu/intel-iommu.c 	if (dmaru->ignored) {
dmaru            4517 drivers/iommu/intel-iommu.c int dmar_iommu_hotplug(struct dmar_drhd_unit *dmaru, bool insert)
dmaru            4520 drivers/iommu/intel-iommu.c 	struct intel_iommu *iommu = dmaru->iommu;
dmaru            4528 drivers/iommu/intel-iommu.c 		ret = intel_iommu_add(dmaru);
dmaru            1453 drivers/iommu/intel_irq_remapping.c static int dmar_ir_add(struct dmar_drhd_unit *dmaru, struct intel_iommu *iommu)
dmaru            1464 drivers/iommu/intel_irq_remapping.c 	if (ir_parse_ioapic_hpet_scope(dmaru->hdr, iommu)) {
dmaru            1486 drivers/iommu/intel_irq_remapping.c int dmar_ir_hotplug(struct dmar_drhd_unit *dmaru, bool insert)
dmaru            1489 drivers/iommu/intel_irq_remapping.c 	struct intel_iommu *iommu = dmaru->iommu;
dmaru            1503 drivers/iommu/intel_irq_remapping.c 			ret = dmar_ir_add(dmaru, iommu);
dmaru             140 include/linux/dmar.h extern int dmar_iommu_hotplug(struct dmar_drhd_unit *dmaru, bool insert);
dmaru             155 include/linux/dmar.h static inline int dmar_iommu_hotplug(struct dmar_drhd_unit *dmaru, bool insert)
dmaru             162 include/linux/dmar.h extern int dmar_ir_hotplug(struct dmar_drhd_unit *dmaru, bool insert);
dmaru             164 include/linux/dmar.h static inline int dmar_ir_hotplug(struct dmar_drhd_unit *dmaru, bool insert)