Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319385
b: refs/heads/master
c: 00d1833
h: refs/heads/master
i:
  319383: 4fb70ff
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jun 12, 2012
1 parent a3cadd9 commit db4e8a5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9eb07a7fb8a90ee39fa9d5489afc0330cfcfbea7
refs/heads/master: 00d18339276d35bc6b7ae6ae1a64ebf2242b89f6
33 changes: 12 additions & 21 deletions trunk/drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1536,18 +1536,6 @@ static int mci_bind_devs(struct mem_ctl_info *mci,
/****************************************************************************
Error check routines
****************************************************************************/
static void i7core_rdimm_update_errcount(struct mem_ctl_info *mci,
const int chan,
const int dimm,
const int add)
{
int i;

for (i = 0; i < add; i++) {
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, 0, 0, 0,
chan, dimm, -1, "error", "");
}
}

static void i7core_rdimm_update_ce_count(struct mem_ctl_info *mci,
const int chan,
Expand Down Expand Up @@ -1586,12 +1574,17 @@ static void i7core_rdimm_update_ce_count(struct mem_ctl_info *mci,

/*updated the edac core */
if (add0 != 0)
i7core_rdimm_update_errcount(mci, chan, 0, add0);
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, add0,
0, 0, 0,
chan, 0, -1, "error", "");
if (add1 != 0)
i7core_rdimm_update_errcount(mci, chan, 1, add1);
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, add1,
0, 0, 0,
chan, 1, -1, "error", "");
if (add2 != 0)
i7core_rdimm_update_errcount(mci, chan, 2, add2);

edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, add2,
0, 0, 0,
chan, 2, -1, "error", "");
}

static void i7core_rdimm_check_mc_ecc_err(struct mem_ctl_info *mci)
Expand Down Expand Up @@ -1710,7 +1703,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
const struct mce *m)
{
struct i7core_pvt *pvt = mci->pvt_info;
char *type, *optype, *err, msg[80];
char *type, *optype, *err;
enum hw_event_mc_err_type tp_event;
unsigned long error = m->status & 0x1ff0000l;
bool uncorrected_error = m->mcgstatus & 1ll << 61;
Expand Down Expand Up @@ -1788,20 +1781,18 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
err = "unknown";
}

snprintf(msg, sizeof(msg), "count=%d %s", core_err_cnt, optype);

/*
* Call the helper to output message
* FIXME: what to do if core_err_cnt > 1? Currently, it generates
* only one event
*/
if (uncorrected_error || !pvt->is_registered)
edac_mc_handle_error(tp_event, mci, 1,
edac_mc_handle_error(tp_event, mci, core_err_cnt,
m->addr >> PAGE_SHIFT,
m->addr & ~PAGE_MASK,
syndrome,
channel, dimm, -1,
err, msg);
err, optype);
}

/*
Expand Down

0 comments on commit db4e8a5

Please sign in to comment.