“6d32c850621b0be75777b9102b14f6268bbd9f0f”上不存在“...include/asm/git@gitcode.net:openanolis/cloud-kernel.git”
提交 247a8266 编写于 作者: J Jiankang Chen 提交者: Jian Zhang

iort: Read ACPI configure to get streamid.

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I63SDZ

-------------------

In ascend feature, the SMMU's sid will read from acpi tabels's streamid. To
enable the SMMU, we must get SID from ACPI table, and make stall_enabled be
true.
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>
上级 73f82da4
......@@ -3249,6 +3249,9 @@ static struct iommu_device *arm_smmu_probe_device(struct device *dev)
struct arm_smmu_device *smmu;
struct arm_smmu_master *master;
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
#ifdef CONFIG_ASCEND_FEATURES
u32 sid;
#endif
if (!fwspec || fwspec->ops != &arm_smmu_ops)
return ERR_PTR(-ENODEV);
......@@ -3295,6 +3298,15 @@ static struct iommu_device *arm_smmu_probe_device(struct device *dev)
smmu->features & ARM_SMMU_FEAT_STALL_FORCE)
master->stall_enabled = true;
#ifdef CONFIG_ASCEND_FEATURES
if (!acpi_dev_prop_read_single(ACPI_COMPANION(dev),
"streamid", DEV_PROP_U32, &sid)) {
if (iommu_fwspec_add_ids(dev, &sid, 1))
dev_info(dev, "failed to add ids\n");
master->stall_enabled = true;
master->ssid_bits = 0x10;
}
#endif
arm_smmu_init_pri(master);
return &smmu->iommu;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册