Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 9457
b: refs/heads/master
c: 7644143
h: refs/heads/master
i:
  9455: 6f06751
v: v3
  • Loading branch information
Mike Waychison authored and Linus Torvalds committed Sep 29, 2005
1 parent 86e8210 commit a58ef5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 7d318d774789657c37a5e994a4a2cf59d4879ae7
refs/heads/master: 7644143cd6f7e029f3a8ea64f5fb0ab33ec39f72
10 changes: 7 additions & 3 deletions trunk/arch/x86_64/kernel/mce.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ void mce_log(struct mce *mce)
{
unsigned next, entry;
mce->finished = 0;
smp_wmb();
wmb();
for (;;) {
entry = rcu_dereference(mcelog.next);
/* The rmb forces the compiler to reload next in each
iteration */
rmb();
for (;;) {
/* When the buffer fills up discard new entries. Assume
that the earlier errors are the more interesting. */
Expand All @@ -69,16 +72,17 @@ void mce_log(struct mce *mce)
entry++;
continue;
}
break;
}
smp_rmb();
next = entry + 1;
if (cmpxchg(&mcelog.next, entry, next) == entry)
break;
}
memcpy(mcelog.entry + entry, mce, sizeof(struct mce));
smp_wmb();
wmb();
mcelog.entry[entry].finished = 1;
smp_wmb();
wmb();

if (!test_and_set_bit(0, &console_logged))
notify_user = 1;
Expand Down

0 comments on commit a58ef5f

Please sign in to comment.