Commit 677eadb4 authored by Gu Zitao's avatar Gu Zitao Committed by Zheng Zengkai
Browse files

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: default avatarLaibin Qiu <qiulaibin@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent ec4ae62c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -239,7 +239,11 @@ int radeon_vce_resume(struct radeon_device *rdev)
		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));
#endif
	if (rdev->family < CHIP_BONAIRE)
		r = vce_v1_0_load_fw(rdev, cpu_addr);
	else {