aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/mcheck/non-fatal.c4
-rw-r--r--arch/x86_64/kernel/mce.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/arch/i386/kernel/cpu/mcheck/non-fatal.c b/arch/i386/kernel/cpu/mcheck/non-fatal.c
index 6b5d3518a1c0..bf39409b3838 100644
--- a/arch/i386/kernel/cpu/mcheck/non-fatal.c
+++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c
@@ -57,7 +57,7 @@ static DECLARE_DELAYED_WORK(mce_work, mce_work_fn);
57static void mce_work_fn(struct work_struct *work) 57static void mce_work_fn(struct work_struct *work)
58{ 58{
59 on_each_cpu(mce_checkregs, NULL, 1, 1); 59 on_each_cpu(mce_checkregs, NULL, 1, 1);
60 schedule_delayed_work(&mce_work, MCE_RATE); 60 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
61} 61}
62 62
63static int __init init_nonfatal_mce_checker(void) 63static int __init init_nonfatal_mce_checker(void)
@@ -82,7 +82,7 @@ static int __init init_nonfatal_mce_checker(void)
82 /* 82 /*
83 * Check for non-fatal errors every MCE_RATE s 83 * Check for non-fatal errors every MCE_RATE s
84 */ 84 */
85 schedule_delayed_work(&mce_work, MCE_RATE); 85 schedule_delayed_work(&mce_work, round_jiffies_relative(MCE_RATE));
86 printk(KERN_INFO "Machine check exception polling timer started.\n"); 86 printk(KERN_INFO "Machine check exception polling timer started.\n");
87 return 0; 87 return 0;
88} 88}
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c
index 7c8ab423abe3..4d8450ee3635 100644
--- a/arch/x86_64/kernel/mce.c
+++ b/arch/x86_64/kernel/mce.c
@@ -375,7 +375,8 @@ static void mcheck_timer(struct work_struct *work)
375 if (mce_notify_user()) { 375 if (mce_notify_user()) {
376 next_interval = max(next_interval/2, HZ/100); 376 next_interval = max(next_interval/2, HZ/100);
377 } else { 377 } else {
378 next_interval = min(next_interval*2, check_interval*HZ); 378 next_interval = min(next_interval*2,
379 (int)round_jiffies_relative(check_interval*HZ));
379 } 380 }
380 381
381 schedule_delayed_work(&mcheck_work, next_interval); 382 schedule_delayed_work(&mcheck_work, next_interval);
@@ -428,7 +429,8 @@ static __init int periodic_mcheck_init(void)
428{ 429{
429 next_interval = check_interval * HZ; 430 next_interval = check_interval * HZ;
430 if (next_interval) 431 if (next_interval)
431 schedule_delayed_work(&mcheck_work, next_interval); 432 schedule_delayed_work(&mcheck_work,
433 round_jiffies_relative(next_interval));
432 idle_notifier_register(&mce_idle_notifier); 434 idle_notifier_register(&mce_idle_notifier);
433 return 0; 435 return 0;
434} 436}
@@ -720,7 +722,8 @@ static void mce_restart(void)
720 on_each_cpu(mce_init, NULL, 1, 1); 722 on_each_cpu(mce_init, NULL, 1, 1);
721 next_interval = check_interval * HZ; 723 next_interval = check_interval * HZ;
722 if (next_interval) 724 if (next_interval)
723 schedule_delayed_work(&mcheck_work, next_interval); 725 schedule_delayed_work(&mcheck_work,
726 round_jiffies_relative(next_interval));
724} 727}
725 728
726static struct sysdev_class mce_sysclass = { 729static struct sysdev_class mce_sysclass = {