Lines Matching +full:4 +full:e

51  * Used to lock EDAC MC to just one module, avoiding two drivers e. g.
56 static struct mem_ctl_info *error_desc_to_mci(struct edac_raw_error_desc *e) in error_desc_to_mci() argument
58 return container_of(e, struct mem_ctl_info, error_desc); in error_desc_to_mci()
84 edac_dbg(4, " channel->chan_idx = %d\n", chan->chan_idx); in edac_mc_dump_channel()
85 edac_dbg(4, " channel = %p\n", chan); in edac_mc_dump_channel()
86 edac_dbg(4, " channel->csrow = %p\n", chan->csrow); in edac_mc_dump_channel()
87 edac_dbg(4, " channel->dimm = %p\n", chan->dimm); in edac_mc_dump_channel()
99 edac_dbg(4, "%s%i: %smapped as virtual row %d, chan %d\n", in edac_mc_dump_dimm()
102 edac_dbg(4, " dimm = %p\n", dimm); in edac_mc_dump_dimm()
103 edac_dbg(4, " dimm->label = '%s'\n", dimm->label); in edac_mc_dump_dimm()
104 edac_dbg(4, " dimm->nr_pages = 0x%x\n", dimm->nr_pages); in edac_mc_dump_dimm()
105 edac_dbg(4, " dimm->grain = %d\n", dimm->grain); in edac_mc_dump_dimm()
110 edac_dbg(4, "csrow->csrow_idx = %d\n", csrow->csrow_idx); in edac_mc_dump_csrow()
111 edac_dbg(4, " csrow = %p\n", csrow); in edac_mc_dump_csrow()
112 edac_dbg(4, " csrow->first_page = 0x%lx\n", csrow->first_page); in edac_mc_dump_csrow()
113 edac_dbg(4, " csrow->last_page = 0x%lx\n", csrow->last_page); in edac_mc_dump_csrow()
114 edac_dbg(4, " csrow->page_mask = 0x%lx\n", csrow->page_mask); in edac_mc_dump_csrow()
115 edac_dbg(4, " csrow->nr_channels = %d\n", csrow->nr_channels); in edac_mc_dump_csrow()
116 edac_dbg(4, " csrow->channels = %p\n", csrow->channels); in edac_mc_dump_csrow()
117 edac_dbg(4, " csrow->mci = %p\n", csrow->mci); in edac_mc_dump_csrow()
126 edac_dbg(4, "\tmci->edac_check = %p\n", mci->edac_check); in edac_mc_dump_mci()
611 if (edac_debug_level >= 4) { in edac_mc_add_mc_with_groups()
804 static void edac_inc_ce_error(struct edac_raw_error_desc *e) in edac_inc_ce_error() argument
806 int pos[EDAC_MAX_LAYERS] = { e->top_layer, e->mid_layer, e->low_layer }; in edac_inc_ce_error()
807 struct mem_ctl_info *mci = error_desc_to_mci(e); in edac_inc_ce_error()
810 mci->ce_mc += e->error_count; in edac_inc_ce_error()
813 dimm->ce_count += e->error_count; in edac_inc_ce_error()
815 mci->ce_noinfo_count += e->error_count; in edac_inc_ce_error()
818 static void edac_inc_ue_error(struct edac_raw_error_desc *e) in edac_inc_ue_error() argument
820 int pos[EDAC_MAX_LAYERS] = { e->top_layer, e->mid_layer, e->low_layer }; in edac_inc_ue_error()
821 struct mem_ctl_info *mci = error_desc_to_mci(e); in edac_inc_ue_error()
824 mci->ue_mc += e->error_count; in edac_inc_ue_error()
827 dimm->ue_count += e->error_count; in edac_inc_ue_error()
829 mci->ue_noinfo_count += e->error_count; in edac_inc_ue_error()
832 static void edac_ce_error(struct edac_raw_error_desc *e) in edac_ce_error() argument
834 struct mem_ctl_info *mci = error_desc_to_mci(e); in edac_ce_error()
840 e->error_count, e->msg, in edac_ce_error()
841 *e->msg ? " " : "", in edac_ce_error()
842 e->label, e->location, e->page_frame_number, e->offset_in_page, in edac_ce_error()
843 e->grain, e->syndrome, in edac_ce_error()
844 *e->other_detail ? " - " : "", in edac_ce_error()
845 e->other_detail); in edac_ce_error()
848 edac_inc_ce_error(e); in edac_ce_error()
863 mci->ctl_page_to_phys(mci, e->page_frame_number) : in edac_ce_error()
864 e->page_frame_number; in edac_ce_error()
866 edac_mc_scrub_block(remapped_page, e->offset_in_page, e->grain); in edac_ce_error()
870 static void edac_ue_error(struct edac_raw_error_desc *e) in edac_ue_error() argument
872 struct mem_ctl_info *mci = error_desc_to_mci(e); in edac_ue_error()
877 e->error_count, e->msg, in edac_ue_error()
878 *e->msg ? " " : "", in edac_ue_error()
879 e->label, e->location, e->page_frame_number, e->offset_in_page, in edac_ue_error()
880 e->grain, in edac_ue_error()
881 *e->other_detail ? " - " : "", in edac_ue_error()
882 e->other_detail); in edac_ue_error()
885 edac_inc_ue_error(e); in edac_ue_error()
889 e->msg, in edac_ue_error()
890 *e->msg ? " " : "", in edac_ue_error()
891 e->label, e->location, e->page_frame_number, e->offset_in_page, in edac_ue_error()
892 e->grain, in edac_ue_error()
893 *e->other_detail ? " - " : "", in edac_ue_error()
894 e->other_detail); in edac_ue_error()
898 static void edac_inc_csrow(struct edac_raw_error_desc *e, int row, int chan) in edac_inc_csrow() argument
900 struct mem_ctl_info *mci = error_desc_to_mci(e); in edac_inc_csrow()
901 enum hw_event_mc_err_type type = e->type; in edac_inc_csrow()
902 u16 count = e->error_count; in edac_inc_csrow()
907 edac_dbg(4, "csrow/channel to increment: (%d,%d)\n", row, chan); in edac_inc_csrow()
918 void edac_raw_mc_handle_error(struct edac_raw_error_desc *e) in edac_raw_mc_handle_error() argument
920 struct mem_ctl_info *mci = error_desc_to_mci(e); in edac_raw_mc_handle_error()
924 if (WARN_ON_ONCE(!e->grain)) in edac_raw_mc_handle_error()
925 e->grain = 1; in edac_raw_mc_handle_error()
927 grain_bits = fls_long(e->grain - 1); in edac_raw_mc_handle_error()
931 trace_mc_event(e->type, e->msg, e->label, e->error_count, in edac_raw_mc_handle_error()
932 mci->mc_idx, e->top_layer, e->mid_layer, in edac_raw_mc_handle_error()
933 e->low_layer, in edac_raw_mc_handle_error()
934 (e->page_frame_number << PAGE_SHIFT) | e->offset_in_page, in edac_raw_mc_handle_error()
935 grain_bits, e->syndrome, e->other_detail); in edac_raw_mc_handle_error()
937 if (e->type == HW_EVENT_ERR_CORRECTED) in edac_raw_mc_handle_error()
938 edac_ce_error(e); in edac_raw_mc_handle_error()
940 edac_ue_error(e); in edac_raw_mc_handle_error()
961 struct edac_raw_error_desc *e = &mci->error_desc; in edac_mc_handle_error() local
968 memset(e, 0, sizeof (*e)); in edac_mc_handle_error()
969 e->error_count = error_count; in edac_mc_handle_error()
970 e->type = type; in edac_mc_handle_error()
971 e->top_layer = top_layer; in edac_mc_handle_error()
972 e->mid_layer = mid_layer; in edac_mc_handle_error()
973 e->low_layer = low_layer; in edac_mc_handle_error()
974 e->page_frame_number = page_frame_number; in edac_mc_handle_error()
975 e->offset_in_page = offset_in_page; in edac_mc_handle_error()
976 e->syndrome = syndrome; in edac_mc_handle_error()
978 e->msg = msg ?: ""; in edac_mc_handle_error()
979 e->other_detail = other_detail ?: ""; in edac_mc_handle_error()
1016 p = e->label; in edac_mc_handle_error()
1018 end = p + sizeof(e->label); in edac_mc_handle_error()
1030 if (dimm->grain > e->grain) in edac_mc_handle_error()
1031 e->grain = dimm->grain; in edac_mc_handle_error()
1044 p = e->label; in edac_mc_handle_error()
1055 edac_dbg(4, "%s csrows map: (%d,%d)\n", in edac_mc_handle_error()
1070 strscpy(e->label, "any memory", sizeof(e->label)); in edac_mc_handle_error()
1071 else if (!*e->label) in edac_mc_handle_error()
1072 strscpy(e->label, "unknown memory", sizeof(e->label)); in edac_mc_handle_error()
1074 edac_inc_csrow(e, row, chan); in edac_mc_handle_error()
1077 p = e->location; in edac_mc_handle_error()
1078 end = p + sizeof(e->location); in edac_mc_handle_error()
1090 edac_raw_mc_handle_error(e); in edac_mc_handle_error()