mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amdgpu: add new aca_smu_type support
Add new types to distinguish between ACA error type and smu mca type. e.g.: the ACA_ERROR_TYPE_DEFERRED is not matched any smu mca valid bank channel, so add new type 'aca_smu_type' to distinguish aca error type and smu mca type. Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -2190,24 +2190,27 @@ static const struct amdgpu_ras_block_hw_ops sdma_v4_4_2_ras_hw_ops = {
|
||||
};
|
||||
|
||||
static int sdma_v4_4_2_aca_bank_generate_report(struct aca_handle *handle,
|
||||
struct aca_bank *bank, enum aca_error_type type,
|
||||
struct aca_bank *bank, enum aca_smu_type type,
|
||||
struct aca_bank_report *report, void *data)
|
||||
{
|
||||
u64 status, misc0;
|
||||
u64 misc0;
|
||||
int ret;
|
||||
|
||||
status = bank->regs[ACA_REG_IDX_STATUS];
|
||||
if ((type == ACA_ERROR_TYPE_UE &&
|
||||
ACA_REG__STATUS__ERRORCODEEXT(status) == ACA_EXTERROR_CODE_FAULT) ||
|
||||
(type == ACA_ERROR_TYPE_CE &&
|
||||
ACA_REG__STATUS__ERRORCODEEXT(status) == ACA_EXTERROR_CODE_CE)) {
|
||||
ret = aca_bank_info_decode(bank, &report->info);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = aca_bank_info_decode(bank, &report->info);
|
||||
if (ret)
|
||||
return ret;
|
||||
misc0 = bank->regs[ACA_REG_IDX_MISC0];
|
||||
|
||||
misc0 = bank->regs[ACA_REG_IDX_MISC0];
|
||||
report->count[type] = ACA_REG__MISC0__ERRCNT(misc0);
|
||||
switch (type) {
|
||||
case ACA_SMU_TYPE_UE:
|
||||
report->count[ACA_ERROR_TYPE_UE] = 1ULL;
|
||||
break;
|
||||
case ACA_SMU_TYPE_CE:
|
||||
report->count[ACA_ERROR_TYPE_CE] = ACA_REG__MISC0__ERRCNT(misc0);
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -2217,7 +2220,7 @@ static int sdma_v4_4_2_aca_bank_generate_report(struct aca_handle *handle,
|
||||
static int sdma_v4_4_2_err_codes[] = { 33, 34, 35, 36 };
|
||||
|
||||
static bool sdma_v4_4_2_aca_bank_is_valid(struct aca_handle *handle, struct aca_bank *bank,
|
||||
enum aca_error_type type, void *data)
|
||||
enum aca_smu_type type, void *data)
|
||||
{
|
||||
u32 instlo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user