lkml.org 
[lkml]   [2014]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tile: avoid overflow in ns2cycles
On 3/4/2014 3:20 AM, Henrik Austad wrote:
> In commit 4cecf6d401a ("sched, x86: Avoid unnecessary overflow in
> sched_clock") and in recent patch "clocksource: avoid unnecessary
> overflow in cyclecounter_cyc2ns()" https://lkml.org/lkml/2014/3/4/17,
> the mult-shift approach is replaced by 2 steps to avoid storing a large,
> intermediate value that could overflow.
>
> arch/tile/kernel/time.c has a similar pattern in cycles2ns, and this
> copies the same pattern in this function
>
> CC: John Stultz <johnstul@us.ibm.com>
> CC: Mike Galbraith <bitbucket@online.de>
> CC: Salman Qazi <sqazi@google.com>
> Signed-off-by: Henrik Austad <henrik@austad.us>
> ---
> arch/tile/kernel/time.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)

Thanks; taken into the tile tree (with some minor whitespace formatting tweaks).

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com



\
 
 \ /
  Last update: 2014-03-06 18:21    [W:0.036 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site