edac: edac_mc_handle_error(): add an error_count parameter

In order to avoid loosing error events, it is desirable to group
error events together and generate a single trace for several identical
errors.

The trace API already allows reporting multiple errors. Change the
handle_error function to also allow that.

The changes at the drivers were made by this small script:

	$file .=$_ while (<>);
	$file =~ s/(edac_mc_handle_error)\s*\(([^\,]+)\,([^\,]+)\,/$1($2,$3, 1,/g;
	print $file;

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Mauro Carvalho Chehab
2012-06-04 13:27:43 -03:00
parent 03f7eae80f
commit 9eb07a7fb8
28 changed files with 104 additions and 95 deletions
+2 -2
View File
@@ -1544,7 +1544,7 @@ static void i7core_rdimm_update_errcount(struct mem_ctl_info *mci,
int i;
for (i = 0; i < add; i++) {
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 0, 0, 0,
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, 0, 0, 0,
chan, dimm, -1, "error", "");
}
}
@@ -1796,7 +1796,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
* only one event
*/
if (uncorrected_error || !pvt->is_registered)
edac_mc_handle_error(tp_event, mci,
edac_mc_handle_error(tp_event, mci, 1,
m->addr >> PAGE_SHIFT,
m->addr & ~PAGE_MASK,
syndrome,