/* This function checks if a specific unity mapping entry is needed for this specific IOMMU.  */
static int iommu_for_unity_map(struct amd_iommu *iommu, struct unity_map_entry *entry)
/* This function checks if a specific unity mapping entry is needed for this specific IOMMU.  */
static int iommu_for_unity_map(struct amd_iommu *iommu, struct unity_map_entry *entry)
{
	u16 bdf, i;
	for (i = entry->devid_start; i <= entry->devid_end; ++i) {
		bdf = amd_iommu_alias_table[i];
		if (amd_iommu_rlookup_table[bdf] == iommu)
			return 1;
	}
	return 0;
}