Lines Matching refs:err_data
166 struct ras_err_data err_data; in amdgpu_reserve_page_direct() local
185 ret = amdgpu_ras_error_data_init(&err_data); in amdgpu_reserve_page_direct()
190 err_data.err_addr = &err_rec; in amdgpu_reserve_page_direct()
191 amdgpu_umc_fill_error_record(&err_data, address, address, 0, 0); in amdgpu_reserve_page_direct()
194 amdgpu_ras_add_bad_pages(adev, err_data.err_addr, in amdgpu_reserve_page_direct()
195 err_data.err_addr_cnt); in amdgpu_reserve_page_direct()
199 amdgpu_ras_error_data_fini(&err_data); in amdgpu_reserve_page_direct()
658 amdgpu_ras_error_data_fini(&obj->err_data); in put_obj()
690 if (amdgpu_ras_error_data_init(&obj->err_data)) in amdgpu_ras_create_obj()
1017 static void amdgpu_ras_get_ecc_info(struct amdgpu_device *adev, struct ras_err_data *err_data) in amdgpu_ras_get_ecc_info() argument
1030 adev->umc.ras->ras_block.hw_ops->query_ras_error_count(adev, err_data); in amdgpu_ras_get_ecc_info()
1037 adev->umc.ras->ras_block.hw_ops->query_ras_error_address(adev, err_data); in amdgpu_ras_get_ecc_info()
1041 adev->umc.ras->ecc_info_query_ras_error_count(adev, err_data); in amdgpu_ras_get_ecc_info()
1045 adev->umc.ras->ecc_info_query_ras_error_address(adev, err_data); in amdgpu_ras_get_ecc_info()
1051 struct ras_err_data *err_data, in amdgpu_ras_error_print_error_data() argument
1063 for_each_ras_error(err_node, err_data) { in amdgpu_ras_error_print_error_data()
1076 for_each_ras_error(err_node, &ras_mgr->err_data) { in amdgpu_ras_error_print_error_data()
1086 for_each_ras_error(err_node, err_data) { in amdgpu_ras_error_print_error_data()
1099 for_each_ras_error(err_node, &ras_mgr->err_data) { in amdgpu_ras_error_print_error_data()
1108 for_each_ras_error(err_node, err_data) { in amdgpu_ras_error_print_error_data()
1121 for_each_ras_error(err_node, &ras_mgr->err_data) { in amdgpu_ras_error_print_error_data()
1140 struct ras_err_data *err_data, in amdgpu_ras_error_generate_report() argument
1147 if (err_data->ce_count) { in amdgpu_ras_error_generate_report()
1148 if (err_data_has_source_info(err_data)) { in amdgpu_ras_error_generate_report()
1149 amdgpu_ras_error_print_error_data(adev, ras_mgr, err_data, qctx, in amdgpu_ras_error_generate_report()
1160 ras_mgr->err_data.ce_count, in amdgpu_ras_error_generate_report()
1165 ras_mgr->err_data.ce_count, in amdgpu_ras_error_generate_report()
1170 if (err_data->ue_count) { in amdgpu_ras_error_generate_report()
1171 if (err_data_has_source_info(err_data)) { in amdgpu_ras_error_generate_report()
1172 amdgpu_ras_error_print_error_data(adev, ras_mgr, err_data, qctx, in amdgpu_ras_error_generate_report()
1183 ras_mgr->err_data.ue_count, in amdgpu_ras_error_generate_report()
1188 ras_mgr->err_data.ue_count, in amdgpu_ras_error_generate_report()
1193 if (err_data->de_count) { in amdgpu_ras_error_generate_report()
1194 if (err_data_has_source_info(err_data)) { in amdgpu_ras_error_generate_report()
1195 amdgpu_ras_error_print_error_data(adev, ras_mgr, err_data, qctx, in amdgpu_ras_error_generate_report()
1206 ras_mgr->err_data.de_count, in amdgpu_ras_error_generate_report()
1211 ras_mgr->err_data.de_count, in amdgpu_ras_error_generate_report()
1217 …d amdgpu_rasmgr_error_data_statistic_update(struct ras_manager *obj, struct ras_err_data *err_data) in amdgpu_rasmgr_error_data_statistic_update() argument
1222 if (err_data_has_source_info(err_data)) { in amdgpu_rasmgr_error_data_statistic_update()
1223 for_each_ras_error(err_node, err_data) { in amdgpu_rasmgr_error_data_statistic_update()
1225 amdgpu_ras_error_statistic_de_count(&obj->err_data, in amdgpu_rasmgr_error_data_statistic_update()
1227 amdgpu_ras_error_statistic_ce_count(&obj->err_data, in amdgpu_rasmgr_error_data_statistic_update()
1229 amdgpu_ras_error_statistic_ue_count(&obj->err_data, in amdgpu_rasmgr_error_data_statistic_update()
1234 obj->err_data.ue_count += err_data->ue_count; in amdgpu_rasmgr_error_data_statistic_update()
1235 obj->err_data.ce_count += err_data->ce_count; in amdgpu_rasmgr_error_data_statistic_update()
1236 obj->err_data.de_count += err_data->de_count; in amdgpu_rasmgr_error_data_statistic_update()
1280 enum aca_error_type type, struct ras_err_data *err_data, in amdgpu_aca_log_ras_error_data() argument
1289 return amdgpu_aca_get_error_data(adev, &obj->aca_handle, type, err_data, qctx); in amdgpu_aca_log_ras_error_data()
1312 struct ras_err_data *err_data, in amdgpu_ras_query_error_status_helper() argument
1328 amdgpu_ras_get_ecc_info(adev, err_data); in amdgpu_ras_query_error_status_helper()
1338 block_obj->hw_ops->query_ras_error_count(adev, err_data); in amdgpu_ras_query_error_status_helper()
1349 ret = amdgpu_aca_log_ras_error_data(adev, blk, ACA_ERROR_TYPE_UE, err_data, qctx); in amdgpu_ras_query_error_status_helper()
1353 ret = amdgpu_aca_log_ras_error_data(adev, blk, ACA_ERROR_TYPE_CE, err_data, qctx); in amdgpu_ras_query_error_status_helper()
1357 ret = amdgpu_aca_log_ras_error_data(adev, blk, ACA_ERROR_TYPE_DEFERRED, err_data, qctx); in amdgpu_ras_query_error_status_helper()
1362 amdgpu_mca_smu_log_ras_error(adev, blk, AMDGPU_MCA_ERROR_TYPE_UE, err_data, qctx); in amdgpu_ras_query_error_status_helper()
1363 amdgpu_mca_smu_log_ras_error(adev, blk, AMDGPU_MCA_ERROR_TYPE_CE, err_data, qctx); in amdgpu_ras_query_error_status_helper()
1376 struct ras_err_data err_data; in amdgpu_ras_query_error_status_with_event() local
1384 ret = amdgpu_ras_error_data_init(&err_data); in amdgpu_ras_query_error_status_with_event()
1401 &err_data, in amdgpu_ras_query_error_status_with_event()
1408 amdgpu_rasmgr_error_data_statistic_update(obj, &err_data); in amdgpu_ras_query_error_status_with_event()
1410 info->ue_count = obj->err_data.ue_count; in amdgpu_ras_query_error_status_with_event()
1411 info->ce_count = obj->err_data.ce_count; in amdgpu_ras_query_error_status_with_event()
1412 info->de_count = obj->err_data.de_count; in amdgpu_ras_query_error_status_with_event()
1414 amdgpu_ras_error_generate_report(adev, info, &err_data, &qctx); in amdgpu_ras_query_error_status_with_event()
1417 amdgpu_ras_error_data_fini(&err_data); in amdgpu_ras_query_error_status_with_event()
2197 struct ras_err_data err_data; in amdgpu_ras_interrupt_umc_handler() local
2203 ret = amdgpu_ras_error_data_init(&err_data); in amdgpu_ras_interrupt_umc_handler()
2211 ret = data->cb(obj->adev, &err_data, entry); in amdgpu_ras_interrupt_umc_handler()
2221 obj->err_data.ue_count += err_data.ue_count; in amdgpu_ras_interrupt_umc_handler()
2222 obj->err_data.ce_count += err_data.ce_count; in amdgpu_ras_interrupt_umc_handler()
2223 obj->err_data.de_count += err_data.de_count; in amdgpu_ras_interrupt_umc_handler()
2226 amdgpu_ras_error_data_fini(&err_data); in amdgpu_ras_interrupt_umc_handler()
2931 struct ras_err_data err_data; in amdgpu_ras_do_page_retirement() local
2941 amdgpu_ras_error_data_init(&err_data); in amdgpu_ras_do_page_retirement()
2943 amdgpu_umc_handle_bad_pages(adev, &err_data); in amdgpu_ras_do_page_retirement()
2944 err_cnt = err_data.err_addr_cnt; in amdgpu_ras_do_page_retirement()
2946 amdgpu_ras_error_data_fini(&err_data); in amdgpu_ras_do_page_retirement()
4529 int amdgpu_ras_error_data_init(struct ras_err_data *err_data) in amdgpu_ras_error_data_init() argument
4531 memset(err_data, 0, sizeof(*err_data)); in amdgpu_ras_error_data_init()
4533 INIT_LIST_HEAD(&err_data->err_node_list); in amdgpu_ras_error_data_init()
4547 void amdgpu_ras_error_data_fini(struct ras_err_data *err_data) in amdgpu_ras_error_data_fini() argument
4551 list_for_each_entry_safe(err_node, tmp, &err_data->err_node_list, node) in amdgpu_ras_error_data_fini()
4555 static struct ras_err_node *amdgpu_ras_error_find_node_by_id(struct ras_err_data *err_data, in amdgpu_ras_error_find_node_by_id() argument
4561 if (!err_data || !mcm_info) in amdgpu_ras_error_find_node_by_id()
4564 for_each_ras_error(err_node, err_data) { in amdgpu_ras_error_find_node_by_id()
4603 static struct ras_err_info *amdgpu_ras_error_get_info(struct ras_err_data *err_data, in amdgpu_ras_error_get_info() argument
4608 err_node = amdgpu_ras_error_find_node_by_id(err_data, mcm_info); in amdgpu_ras_error_get_info()
4618 err_data->err_list_count++; in amdgpu_ras_error_get_info()
4619 list_add_tail(&err_node->node, &err_data->err_node_list); in amdgpu_ras_error_get_info()
4620 list_sort(NULL, &err_data->err_node_list, ras_err_info_cmp); in amdgpu_ras_error_get_info()
4625 int amdgpu_ras_error_statistic_ue_count(struct ras_err_data *err_data, in amdgpu_ras_error_statistic_ue_count() argument
4631 if (!err_data || !mcm_info) in amdgpu_ras_error_statistic_ue_count()
4637 err_info = amdgpu_ras_error_get_info(err_data, mcm_info); in amdgpu_ras_error_statistic_ue_count()
4642 err_data->ue_count += count; in amdgpu_ras_error_statistic_ue_count()
4647 int amdgpu_ras_error_statistic_ce_count(struct ras_err_data *err_data, in amdgpu_ras_error_statistic_ce_count() argument
4653 if (!err_data || !mcm_info) in amdgpu_ras_error_statistic_ce_count()
4659 err_info = amdgpu_ras_error_get_info(err_data, mcm_info); in amdgpu_ras_error_statistic_ce_count()
4664 err_data->ce_count += count; in amdgpu_ras_error_statistic_ce_count()
4669 int amdgpu_ras_error_statistic_de_count(struct ras_err_data *err_data, in amdgpu_ras_error_statistic_de_count() argument
4675 if (!err_data || !mcm_info) in amdgpu_ras_error_statistic_de_count()
4681 err_info = amdgpu_ras_error_get_info(err_data, mcm_info); in amdgpu_ras_error_statistic_de_count()
4686 err_data->de_count += count; in amdgpu_ras_error_statistic_de_count()