Commit f78ae314 authored by Arindam Nath's avatar Arindam Nath Committed by Greg Kroah-Hartman
Browse files

iommu/amd: Return devid as alias for ACPI HID devices

[ Upstream commit 5ebb1bc2


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: default avatarArindam Nath <>
Fixes: 2bf9a0a1

 ('iommu/amd: Add iommu support for ACPI HID devices')
Signed-off-by: default avatarJoerg Roedel <>
Signed-off-by: default avatarSasha Levin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 62c15d06
......@@ -253,7 +253,13 @@ static u16 get_alias(struct device *dev)
/* The callers make sure that get_device_id() does not fail here */
devid = get_device_id(dev);
/* For ACPI HID devices, we simply return the devid as such */
if (!dev_is_pci(dev))
return devid;
ivrs_alias = amd_iommu_alias_table[devid];
pci_for_each_dma_alias(pdev, __last_alias, &pci_alias);
if (ivrs_alias == pci_alias)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment