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

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

AMD IOMMU: use calc_devid in prealloc_protection_domains



Impact: cleanup

Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent c226f853
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1543,7 +1543,7 @@ void prealloc_protection_domains(void)
	u16 devid;
	u16 devid;


	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
	while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
		devid = (dev->bus->number << 8) | dev->devfn;
		devid = calc_devid(dev->bus->number, dev->devfn);
		if (devid > amd_iommu_last_bdf)
		if (devid > amd_iommu_last_bdf)
			continue;
			continue;
		devid = amd_iommu_alias_table[devid];
		devid = amd_iommu_alias_table[devid];