diff options
author | Mike Galbraith <bitbucket@online.de> | 2013-05-29 11:52:13 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-10 00:19:41 (GMT) |
commit | df6508878d3996ca0c78a4330498add799c28f7d (patch) | |
tree | 178e729011039b738459bcbb9e1df5f3e7d530f8 /arch/x86/kernel/cpu | |
parent | df36f3d72f5dcb3b838e2e8cce042cd5f1e25ddc (diff) | |
download | linux-fsl-qoriq-df6508878d3996ca0c78a4330498add799c28f7d.tar.xz |
x86/mce: fix mce timer interval
Seems mce timer fire at the wrong frequency in -rt kernels since roughly
forever due to 32 bit overflow. 3.8-rt is also missing a multiplier.
Add missing us -> ns conversion and 32 bit overflow prevention.
Cc: stable-rt@vger.kernel.org
Signed-off-by: Mike Galbraith <bitbucket@online.de>
[bigeasy: use ULL instead of u64 cast]
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/cpu')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index 534b46b..933a842 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -1303,7 +1303,8 @@ static enum hrtimer_restart mce_timer_fn(struct hrtimer *timer) __this_cpu_write(mce_next_interval, iv); /* Might have become 0 after CMCI storm subsided */ if (iv) { - hrtimer_forward_now(timer, ns_to_ktime(jiffies_to_usecs(iv))); + hrtimer_forward_now(timer, ns_to_ktime( + jiffies_to_usecs(iv) * 1000ULL)); return HRTIMER_RESTART; } return HRTIMER_NORESTART; @@ -1331,7 +1332,7 @@ void mce_timer_kick(unsigned long interval) } } else { hrtimer_start_range_ns(t, - ns_to_ktime(jiffies_to_usecs(interval) * 1000), + ns_to_ktime(jiffies_to_usecs(interval) * 1000ULL), 0, HRTIMER_MODE_REL_PINNED); } if (interval < iv) @@ -1653,7 +1654,7 @@ static void mce_start_timer(unsigned int cpu, struct hrtimer *t) if (mca_cfg.ignore_ce || !iv) return; - hrtimer_start_range_ns(t, ns_to_ktime(jiffies_to_usecs(iv) * 1000), + hrtimer_start_range_ns(t, ns_to_ktime(jiffies_to_usecs(iv) * 1000ULL), 0, HRTIMER_MODE_REL_PINNED); } |