/* If a device is not yet associated with a domain, this function does assigns it visible for the hardware  */
static int attach_device(struct device *dev, struct protection_domain *domain)
/* If a device is not yet associated with a domain, this function does assigns it visible for the hardware  */
static int attach_device(struct device *dev, struct protection_domain *domain)
{
	unsigned long flags;
	int ret;
	write_lock_irqsave(&amd_iommu_devtable_lock, flags);
	ret = __attach_device(dev, domain);
	write_unlock_irqrestore(&amd_iommu_devtable_lock, flags);
	iommu_flush_tlb_pde(domain);
	return ret;
}