* [patch] rt,mce: fix mce timer interval
@ 2013-05-29 11:52 Mike Galbraith
2013-05-31 14:05 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 2+ messages in thread
From: Mike Galbraith @ 2013-05-29 11:52 UTC (permalink / raw)
To: RT; +Cc: Thomas Gleixner, Steven Rostedt, Sebastian Andrzej Siewior
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.
Signed-off-by: Mike Galbraith <bitbucket@online.de>
---
arch/x86/kernel/cpu/mcheck/mce.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1295,7 +1295,7 @@ static enum hrtimer_restart mce_timer_fn
__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((u64)jiffies_to_usecs(iv) * 1000));
return HRTIMER_RESTART;
}
return HRTIMER_NORESTART;
@@ -1323,7 +1323,7 @@ void mce_timer_kick(unsigned long interv
}
} else {
hrtimer_start_range_ns(t,
- ns_to_ktime(jiffies_to_usecs(interval) * 1000),
+ ns_to_ktime((u64)jiffies_to_usecs(interval) * 1000),
0, HRTIMER_MODE_REL_PINNED);
}
if (interval < iv)
@@ -1691,7 +1691,7 @@ static void mce_start_timer(unsigned int
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((u64)jiffies_to_usecs(iv) * 1000),
0, HRTIMER_MODE_REL_PINNED);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch] rt,mce: fix mce timer interval
2013-05-29 11:52 [patch] rt,mce: fix mce timer interval Mike Galbraith
@ 2013-05-31 14:05 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-05-31 14:05 UTC (permalink / raw)
To: Mike Galbraith; +Cc: RT, Thomas Gleixner, Steven Rostedt
On 05/29/2013 01:52 PM, Mike Galbraith wrote:
> 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.
>
> Signed-off-by: Mike Galbraith <bitbucket@online.de>
Thank you. I replaced (u64) cast by adding ULL to the numeric value.
Sebastian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-31 14:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-29 11:52 [patch] rt,mce: fix mce timer interval Mike Galbraith
2013-05-31 14:05 ` Sebastian Andrzej Siewior
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.