提交 e1063493 编写于 作者: T Tao Zhou 提交者: Alex Deucher

drm/amdgpu: add check for ras error type

only ue and ce errors are supported
Signed-off-by: NTao Zhou <tao.zhou1@amd.com>
Reviewed-by: NDennis Li <dennis.li@amd.com>
Reviewed-by: NHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 81e02619
...@@ -155,9 +155,14 @@ static int amdgpu_ras_debugfs_ctrl_parse_data(struct file *f, ...@@ -155,9 +155,14 @@ static int amdgpu_ras_debugfs_ctrl_parse_data(struct file *f,
return -EINVAL; return -EINVAL;
data->head.block = block_id; data->head.block = block_id;
data->head.type = memcmp("ue", err, 2) == 0 ? /* only ue and ce errors are supported */
AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE : if (!memcmp("ue", err, 2))
AMDGPU_RAS_ERROR__SINGLE_CORRECTABLE; data->head.type = AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE;
else if (!memcmp("ce", err, 2))
data->head.type = AMDGPU_RAS_ERROR__SINGLE_CORRECTABLE;
else
return -EINVAL;
data->op = op; data->op = op;
if (op == 2) { if (op == 2) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册