Skip to content

Commit

Permalink
iommu/amd: Return devid as alias for ACPI HID devices
Browse files Browse the repository at this point in the history
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 <[email protected]>
Fixes: 2bf9a0a ('iommu/amd: Add iommu support for ACPI HID devices')
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
amd-anath authored and joergroedel committed Sep 26, 2018
1 parent be9e659 commit 5ebb1bc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/iommu/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,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)
Expand Down

0 comments on commit 5ebb1bc

Please sign in to comment.