mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
drm/amdgpu: Include ACA error type in aca bank
ACA error types managed by driver a direct 1:1 correspondence with those managed by firmware. To address this, for each ACA bank, include both the ACA error type and the ACA SMU type. This addition is useful for creating CPER records. Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Yang Wang <keivnyang.wang@amd.com> Reviewed-by: Tao Zhou <tao.zhou1@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
76b1f8b32d
commit
56316ee91b
|
|
@ -168,7 +168,7 @@ static int aca_smu_get_valid_aca_banks(struct amdgpu_device *adev, enum aca_smu_
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
bank.type = type;
|
||||
bank.smu_err_type = type;
|
||||
|
||||
aca_smu_bank_dump(adev, i, count, &bank, qctx);
|
||||
|
||||
|
|
|
|||
|
|
@ -108,13 +108,15 @@ enum aca_error_type {
|
|||
};
|
||||
|
||||
enum aca_smu_type {
|
||||
ACA_SMU_TYPE_INVALID = -1,
|
||||
ACA_SMU_TYPE_UE = 0,
|
||||
ACA_SMU_TYPE_CE,
|
||||
ACA_SMU_TYPE_COUNT,
|
||||
};
|
||||
|
||||
struct aca_bank {
|
||||
enum aca_smu_type type;
|
||||
enum aca_error_type aca_err_type;
|
||||
enum aca_smu_type smu_err_type;
|
||||
u64 regs[ACA_MAX_REGS_COUNT];
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1123,10 +1123,12 @@ static int xgmi_v6_4_0_aca_bank_parser(struct aca_handle *handle, struct aca_ban
|
|||
if (ext_error_code != 0 && ext_error_code != 9)
|
||||
count = 0ULL;
|
||||
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_UE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_UE, count);
|
||||
break;
|
||||
case ACA_SMU_TYPE_CE:
|
||||
count = ext_error_code == 6 ? count : 0ULL;
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_CE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_CE, count);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -891,10 +891,12 @@ static int gfx_v9_4_3_aca_bank_parser(struct aca_handle *handle,
|
|||
|
||||
switch (type) {
|
||||
case ACA_SMU_TYPE_UE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_UE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info,
|
||||
ACA_ERROR_TYPE_UE, 1ULL);
|
||||
break;
|
||||
case ACA_SMU_TYPE_CE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_CE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info,
|
||||
ACA_ERROR_TYPE_CE, ACA_REG__MISC0__ERRCNT(misc0));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1291,10 +1291,12 @@ static int jpeg_v4_0_3_aca_bank_parser(struct aca_handle *handle, struct aca_ban
|
|||
misc0 = bank->regs[ACA_REG_IDX_MISC0];
|
||||
switch (type) {
|
||||
case ACA_SMU_TYPE_UE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_UE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_UE,
|
||||
1ULL);
|
||||
break;
|
||||
case ACA_SMU_TYPE_CE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_CE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_CE,
|
||||
ACA_REG__MISC0__ERRCNT(misc0));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -746,10 +746,12 @@ static int mmhub_v1_8_aca_bank_parser(struct aca_handle *handle, struct aca_bank
|
|||
misc0 = bank->regs[ACA_REG_IDX_MISC0];
|
||||
switch (type) {
|
||||
case ACA_SMU_TYPE_UE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_UE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_UE,
|
||||
1ULL);
|
||||
break;
|
||||
case ACA_SMU_TYPE_CE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_CE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_CE,
|
||||
ACA_REG__MISC0__ERRCNT(misc0));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -2392,10 +2392,12 @@ static int sdma_v4_4_2_aca_bank_parser(struct aca_handle *handle, struct aca_ban
|
|||
misc0 = bank->regs[ACA_REG_IDX_MISC0];
|
||||
switch (type) {
|
||||
case ACA_SMU_TYPE_UE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_UE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_UE,
|
||||
1ULL);
|
||||
break;
|
||||
case ACA_SMU_TYPE_CE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_CE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_CE,
|
||||
ACA_REG__MISC0__ERRCNT(misc0));
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -415,6 +415,7 @@ static int umc_v12_0_aca_bank_parser(struct aca_handle *handle, struct aca_bank
|
|||
err_type = ACA_ERROR_TYPE_CE;
|
||||
else
|
||||
return 0;
|
||||
bank->aca_err_type = err_type;
|
||||
|
||||
ret = aca_bank_info_decode(bank, &info);
|
||||
if (ret)
|
||||
|
|
|
|||
|
|
@ -1925,10 +1925,12 @@ static int vcn_v4_0_3_aca_bank_parser(struct aca_handle *handle, struct aca_bank
|
|||
misc0 = bank->regs[ACA_REG_IDX_MISC0];
|
||||
switch (type) {
|
||||
case ACA_SMU_TYPE_UE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_UE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_UE,
|
||||
1ULL);
|
||||
break;
|
||||
case ACA_SMU_TYPE_CE:
|
||||
bank->aca_err_type = ACA_ERROR_TYPE_CE;
|
||||
ret = aca_error_cache_log_bank_error(handle, &info, ACA_ERROR_TYPE_CE,
|
||||
ACA_REG__MISC0__ERRCNT(misc0));
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user