提交 677eadb4 编写于 作者: G Gu Zitao 提交者: Zheng Zengkai

sw64: radeon: correct low-level mmio memset direct calls

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SPZD
CVE: NA

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

Driver codes of the direct calls, via the SIMD-optimized memset and
memcpy functions, may raise dfault under sw64 architecture, so work
around 'memset' references to '_memset_c_io' calls.

Signed-off-by: Gu Zitao <guzitao@wxiat.com> #openEuler_contributor
Signed-off-by: NLaibin Qiu <qiulaibin@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 ec4ae62c
...@@ -239,7 +239,11 @@ int radeon_vce_resume(struct radeon_device *rdev) ...@@ -239,7 +239,11 @@ int radeon_vce_resume(struct radeon_device *rdev)
return r; return r;
} }
#ifdef __sw_64__
_memset_c_io(cpu_addr, 0, radeon_bo_size(rdev->vce.vcpu_bo));
#else
memset(cpu_addr, 0, radeon_bo_size(rdev->vce.vcpu_bo)); memset(cpu_addr, 0, radeon_bo_size(rdev->vce.vcpu_bo));
#endif
if (rdev->family < CHIP_BONAIRE) if (rdev->family < CHIP_BONAIRE)
r = vce_v1_0_load_fw(rdev, cpu_addr); r = vce_v1_0_load_fw(rdev, cpu_addr);
else { else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册