提交 fc505525 编写于 作者: J Jiankang Chen 提交者: Xie XiuQi

iort: Read ACPI configure to get streamid.

hulk inclusion
category: feature
bugzilla: 14369
CVE: NA
-------------------

read ACPI configure to get streamid.
Signed-off-by: NJiankang Chen <chenjiankang1@huawei.com>
Signed-off-by: NFang Lijun <fanglijun3@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 05ab2496
...@@ -1085,12 +1085,23 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev) ...@@ -1085,12 +1085,23 @@ const struct iommu_ops *iort_iommu_configure(struct device *dev)
return NULL; return NULL;
do { do {
u32 sid;
parent = iort_node_map_platform_id(node, &streamid, parent = iort_node_map_platform_id(node, &streamid,
IORT_IOMMU_TYPE, IORT_IOMMU_TYPE,
i++); i++);
if (parent) if (parent)
err = iort_iommu_xlate(dev, parent, streamid); err = iort_iommu_xlate(dev, parent, streamid);
if (!acpi_dev_prop_read_single(ACPI_COMPANION(dev),
"streamid", DEV_PROP_U32, &sid)) {
err = iommu_fwspec_add_ids(dev, &sid, 1);
if (err)
dev_info(dev, "failed to add ids\n");
dev->iommu_fwspec->can_stall = true;
dev->iommu_fwspec->num_pasid_bits = 0x10;
}
} while (parent && !err); } while (parent && !err);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册