Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200071
b: refs/heads/master
c: 6e103be
h: refs/heads/master
i:
  200069: 4b088e3
  200067: 0826077
  200063: 302ff22
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed May 10, 2010
1 parent a6e88ff commit a5f6d1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 4f87fad1d32fcdda448f9eb430c9c234a1939ece
refs/heads/master: 6e103be1c7c4adb50f25aaf1f1e8f828833c1719
13 changes: 6 additions & 7 deletions trunk/drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1678,6 +1678,8 @@ static void i7core_check_error(struct mem_ctl_info *mci)
* This routine simply queues mcelog errors, and
* return. The error itself should be handled later
* by i7core_check_error.
* WARNING: As this routine should be called at NMI time, extra care should
* be taken to avoid deadlocks, and to be as fast as possible.
*/
static int i7core_mce_check_error(void *priv, struct mce *mce)
{
Expand All @@ -1696,23 +1698,20 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
return 0;

/* Only handle if it is the right mc controller */
if (cpu_data(mce->cpu).phys_proc_id != pvt->i7core_dev->socket) {
debugf0("mc%d: ignoring mce log for socket %d. "
"Another mc should get it.\n",
pvt->i7core_dev->socket,
cpu_data(mce->cpu).phys_proc_id);
if (cpu_data(mce->cpu).phys_proc_id != pvt->i7core_dev->socket)
return 0;
}

smp_rmb();
if ((pvt->mce_out + 1) % sizeof(mce_entry) == pvt->mce_in) {
smp_wmb();
pvt->mce_overrun++;
return 0;
}

/* Copy memory error at the ringbuffer */
memcpy(&pvt->mce_entry[pvt->mce_out], mce, sizeof(*mce));
smp_wmb();
pvt->mce_out = (pvt->mce_out + 1) % sizeof(mce_entry);
memcpy(&pvt->mce_entry[pvt->mce_out], mce, sizeof(*mce));

/* Handle fatal errors immediately */
if (mce->mcgstatus & 1)
Expand Down

0 comments on commit a5f6d1d

Please sign in to comment.