Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138643
b: refs/heads/master
c: 8457c84
h: refs/heads/master
i:
  138641: a17e12b
  138639: 20ff9ad
v: v3
  • Loading branch information
Andi Kleen authored and H. Peter Anvin committed Feb 24, 2009
1 parent 8dd6a4d commit 34fe7f8
Show file tree
Hide file tree
Showing 2 changed files with 6 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: f9695df42cdbca78530b4458c38ecfdd0bb90079
refs/heads/master: 8457c84d68678cbfd4167a9073b89da58e48c037
11 changes: 5 additions & 6 deletions trunk/arch/x86/kernel/cpu/mcheck/mce_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <linux/kdebug.h>
#include <linux/kobject.h>
#include <linux/sysfs.h>
#include <linux/ratelimit.h>
#include <asm/processor.h>
#include <asm/msr.h>
#include <asm/mce.h>
Expand Down Expand Up @@ -488,11 +489,11 @@ static DECLARE_WORK(mce_trigger_work, mce_do_trigger);
*/
int mce_notify_user(void)
{
/* Not more than two messages every minute */
static DEFINE_RATELIMIT_STATE(ratelimit, 60*HZ, 2);

clear_thread_flag(TIF_MCE_NOTIFY);
if (test_and_clear_bit(0, &notify_user)) {
static unsigned long last_print;
unsigned long now = jiffies;

wake_up_interruptible(&mce_wait);

/*
Expand All @@ -503,10 +504,8 @@ int mce_notify_user(void)
if (trigger[0] && !work_pending(&mce_trigger_work))
schedule_work(&mce_trigger_work);

if (time_after_eq(now, last_print + (check_interval*HZ))) {
last_print = now;
if (__ratelimit(&ratelimit))
printk(KERN_INFO "Machine check events logged\n");
}

return 1;
}
Expand Down

0 comments on commit 34fe7f8

Please sign in to comment.