/* Inits the unity mappings required for a specific device  */
static int init_unity_mappings_for_device(struct dma_ops_domain *dma_dom, u16 devid)
/* Inits the unity mappings required for a specific device  */
static int init_unity_mappings_for_device(struct dma_ops_domain *dma_dom, u16 devid)
{
	struct unity_map_entry *e;
	int ret;
	list_for_each_entry(e, &amd_iommu_unity_map, list) {
		if (!(devid >= e->devid_start && devid <= e->devid_end))
			continue;
		ret = dma_ops_unity_map(dma_dom, e);
		if (ret)
			return ret;
	}
	return 0;
}