Skip to content

Commit f78ae31

Browse files
amd-anathgregkh
authored andcommitted
iommu/amd: Return devid as alias for ACPI HID devices
[ Upstream commit 5ebb1bc ] ACPI HID devices do not actually have an alias for them in the IVRS. But dev_data->alias is still used for indexing into the IOMMU device table for devices being handled by the IOMMU. So for ACPI HID devices, we simply return the corresponding devid as an alias, as parsed from IVRS table. Signed-off-by: Arindam Nath <arindam.nath@amd.com> Fixes: 2bf9a0a ('iommu/amd: Add iommu support for ACPI HID devices') Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 62c15d0 commit f78ae31

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

drivers/iommu/amd_iommu.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,13 @@ static u16 get_alias(struct device *dev)
253253

254254
/* The callers make sure that get_device_id() does not fail here */
255255
devid = get_device_id(dev);
256+
257+
/* For ACPI HID devices, we simply return the devid as such */
258+
if (!dev_is_pci(dev))
259+
return devid;
260+
256261
ivrs_alias = amd_iommu_alias_table[devid];
262+
257263
pci_for_each_dma_alias(pdev, __last_alias, &pci_alias);
258264

259265
if (ivrs_alias == pci_alias)

0 commit comments

Comments
 (0)