lkml.org 
[lkml]   [2014]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v8 1/2] timekeeping: Added a function to return tv_sec portion of ktime_get_ts64()
Date
On Wednesday 29 October 2014 16:01:16 Heena Sirwani wrote:
> The following patch adds a function to return tv_sec portion of
> ktime_get_ts64() function in order to have a function that returns
> seconds as 64-bit integers instead of 32-bit integers to address the
> y2038 problem.
>
> Since we are interested only in the seconds portion of ktime_get_ts64()
> and require this to be as fast as possible, we take the implementation
> of ktime_get_ts64() as it is and remove everything pertaining to the
> nanoseconds portion. We only add to the seconds calculation if the
> calculation of nanoseconds is more than one billion nanoseconds. For all
> this calculation, we add a new field to the timekeeper struct,
> ktime_sec. We update this field in the function tk_update_ktime_data()
> by including the calculation of monotonic clock time in seconds and
> including the tk_xtime() implementation that gives the nanoseconds value
> of last timer click instead of using timekeeping_get_ns() which is
> expensive and we do not require such fine resolution for nanoseconds.
>
> Signed-off-by: Heena Sirwani <heenasirwani@gmail.com>
>

Reviewed-by: Arnd Bergmann <arnd@arndb.de>


\
 
 \ /
  Last update: 2014-10-29 12:01    [W:0.095 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site