Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200072
b: refs/heads/master
c: 321ece4
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed May 10, 2010
1 parent a5f6d1d commit 3875eee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 6e103be1c7c4adb50f25aaf1f1e8f828833c1719
refs/heads/master: 321ece4dda32f52d4a28d6eb11f2ca2a5c93c191
12 changes: 6 additions & 6 deletions trunk/drivers/edac/i7core_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1631,14 +1631,14 @@ static void i7core_check_error(struct mem_ctl_info *mci)
* loosing an error.
*/
smp_rmb();
count = (pvt->mce_out + sizeof(mce_entry) - pvt->mce_in)
% sizeof(mce_entry);
count = (pvt->mce_out + MCE_LOG_LEN - pvt->mce_in)
% MCE_LOG_LEN;
if (!count)
return;

m = pvt->mce_outentry;
if (pvt->mce_in + count > sizeof(mce_entry)) {
unsigned l = sizeof(mce_entry) - pvt->mce_in;
if (pvt->mce_in + count > MCE_LOG_LEN) {
unsigned l = MCE_LOG_LEN - pvt->mce_in;

memcpy(m, &pvt->mce_entry[pvt->mce_in], sizeof(*m) * l);
smp_wmb();
Expand Down Expand Up @@ -1702,7 +1702,7 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
return 0;

smp_rmb();
if ((pvt->mce_out + 1) % sizeof(mce_entry) == pvt->mce_in) {
if ((pvt->mce_out + 1) % MCE_LOG_LEN == pvt->mce_in) {
smp_wmb();
pvt->mce_overrun++;
return 0;
Expand All @@ -1711,7 +1711,7 @@ static int i7core_mce_check_error(void *priv, struct mce *mce)
/* 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);
pvt->mce_out = (pvt->mce_out + 1) % MCE_LOG_LEN;

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

0 comments on commit 3875eee

Please sign in to comment.