Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1179dc0 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

AMD IOMMU: rename set_device_domain function



Impact: rename set_device_domain() to attach_device()

Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 863c74eb
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -820,7 +820,7 @@ static struct protection_domain *domain_for_device(u16 devid)
 * If a device is not yet associated with a domain, this function does
 * If a device is not yet associated with a domain, this function does
 * assigns it visible for the hardware
 * assigns it visible for the hardware
 */
 */
static void set_device_domain(struct amd_iommu *iommu,
static void attach_device(struct amd_iommu *iommu,
			  struct protection_domain *domain,
			  struct protection_domain *domain,
			  u16 devid)
			  u16 devid)
{
{
@@ -929,14 +929,14 @@ static int get_device_resources(struct device *dev,
		if (!dma_dom)
		if (!dma_dom)
			dma_dom = (*iommu)->default_dom;
			dma_dom = (*iommu)->default_dom;
		*domain = &dma_dom->domain;
		*domain = &dma_dom->domain;
		set_device_domain(*iommu, *domain, *bdf);
		attach_device(*iommu, *domain, *bdf);
		printk(KERN_INFO "AMD IOMMU: Using protection domain %d for "
		printk(KERN_INFO "AMD IOMMU: Using protection domain %d for "
				"device ", (*domain)->id);
				"device ", (*domain)->id);
		print_devid(_bdf, 1);
		print_devid(_bdf, 1);
	}
	}


	if (domain_for_device(_bdf) == NULL)
	if (domain_for_device(_bdf) == NULL)
		set_device_domain(*iommu, *domain, _bdf);
		attach_device(*iommu, *domain, _bdf);


	return 1;
	return 1;
}
}