@@ -1536,18 +1536,6 @@ static int mci_bind_devs(struct mem_ctl_info *mci,
15361536/****************************************************************************
15371537 Error check routines
15381538 ****************************************************************************/
1539- static void i7core_rdimm_update_errcount (struct mem_ctl_info * mci ,
1540- const int chan ,
1541- const int dimm ,
1542- const int add )
1543- {
1544- int i ;
1545-
1546- for (i = 0 ; i < add ; i ++ ) {
1547- edac_mc_handle_error (HW_EVENT_ERR_CORRECTED , mci , 1 , 0 , 0 , 0 ,
1548- chan , dimm , -1 , "error" , "" );
1549- }
1550- }
15511539
15521540static void i7core_rdimm_update_ce_count (struct mem_ctl_info * mci ,
15531541 const int chan ,
@@ -1586,12 +1574,17 @@ static void i7core_rdimm_update_ce_count(struct mem_ctl_info *mci,
15861574
15871575 /*updated the edac core */
15881576 if (add0 != 0 )
1589- i7core_rdimm_update_errcount (mci , chan , 0 , add0 );
1577+ edac_mc_handle_error (HW_EVENT_ERR_CORRECTED , mci , add0 ,
1578+ 0 , 0 , 0 ,
1579+ chan , 0 , -1 , "error" , "" );
15901580 if (add1 != 0 )
1591- i7core_rdimm_update_errcount (mci , chan , 1 , add1 );
1581+ edac_mc_handle_error (HW_EVENT_ERR_CORRECTED , mci , add1 ,
1582+ 0 , 0 , 0 ,
1583+ chan , 1 , -1 , "error" , "" );
15921584 if (add2 != 0 )
1593- i7core_rdimm_update_errcount (mci , chan , 2 , add2 );
1594-
1585+ edac_mc_handle_error (HW_EVENT_ERR_CORRECTED , mci , add2 ,
1586+ 0 , 0 , 0 ,
1587+ chan , 2 , -1 , "error" , "" );
15951588}
15961589
15971590static void i7core_rdimm_check_mc_ecc_err (struct mem_ctl_info * mci )
@@ -1710,7 +1703,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
17101703 const struct mce * m )
17111704{
17121705 struct i7core_pvt * pvt = mci -> pvt_info ;
1713- char * type , * optype , * err , msg [ 80 ] ;
1706+ char * type , * optype , * err ;
17141707 enum hw_event_mc_err_type tp_event ;
17151708 unsigned long error = m -> status & 0x1ff0000l ;
17161709 bool uncorrected_error = m -> mcgstatus & 1ll << 61 ;
@@ -1788,20 +1781,18 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
17881781 err = "unknown" ;
17891782 }
17901783
1791- snprintf (msg , sizeof (msg ), "count=%d %s" , core_err_cnt , optype );
1792-
17931784 /*
17941785 * Call the helper to output message
17951786 * FIXME: what to do if core_err_cnt > 1? Currently, it generates
17961787 * only one event
17971788 */
17981789 if (uncorrected_error || !pvt -> is_registered )
1799- edac_mc_handle_error (tp_event , mci , 1 ,
1790+ edac_mc_handle_error (tp_event , mci , core_err_cnt ,
18001791 m -> addr >> PAGE_SHIFT ,
18011792 m -> addr & ~PAGE_MASK ,
18021793 syndrome ,
18031794 channel , dimm , -1 ,
1804- err , msg );
1795+ err , optype );
18051796}
18061797
18071798/*
0 commit comments