/* Basically iterates over all unity mapping entries and applies them to the default domain DMA of that IOMMU if necessary.  */
static int iommu_init_unity_mappings(struct amd_iommu *iommu)
/* Basically iterates over all unity mapping entries and applies them to the default domain DMA of that IOMMU if necessary.  */
static int iommu_init_unity_mappings(struct amd_iommu *iommu)
{
	struct unity_map_entry *entry;
	int ret;
	list_for_each_entry(entry, &amd_iommu_unity_map, list) {
		if (!iommu_for_unity_map(iommu, entry))
			continue;
		ret = dma_ops_unity_map(iommu->default_dom, entry);
		if (ret)
			return ret;
	}
	return 0;
}