From: Zhang Jian zhangjian210@huawei.com
hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I63SDZ CVE: NA
-------------------------------
In Ascend featue, when we make CONFIG_ARM_AMMU_V3 be M, and when we build arm-smmu-v3.ko, it will miss symbols for acpi_dev_prop_read_single. So use acpi_dev_get_property to replace the old interface
Signed-off-by: Zhang Jian zhangjian210@huawei.com --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 788310f92642..4381876977b2 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2659,6 +2659,7 @@ static struct iommu_device *arm_smmu_probe_device(struct device *dev) struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev); #ifdef CONFIG_ASCEND_FEATURES u32 sid; + const union acpi_object *obj = NULL; #endif
if (!fwspec || fwspec->ops != &arm_smmu_ops) @@ -2707,8 +2708,9 @@ static struct iommu_device *arm_smmu_probe_device(struct device *dev) master->stall_enabled = true;
#ifdef CONFIG_ASCEND_FEATURES - if (!acpi_dev_prop_read_single(ACPI_COMPANION(dev), - "streamid", DEV_PROP_U32, &sid)) { + if (!acpi_dev_get_property(ACPI_COMPANION(dev), + "streamid", ACPI_TYPE_INTEGER, &obj) && obj) { + sid = obj->integer.value; if (iommu_fwspec_add_ids(dev, &sid, 1)) dev_info(dev, "failed to add ids\n"); master->stall_enabled = true;