[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6923588.JzQ3nF9J4j@wuerfel>
Date: Wed, 29 Oct 2014 11:47:12 +0100
From: Arnd Bergmann <arnd@...db.de>
To: Heena Sirwani <heenasirwani@...il.com>
Cc: opw-kernel@...glegroups.com, linux-kernel@...r.kernel.org,
john.stultz@...aro.org, tglx@...utronix.de
Subject: Re: [PATCH v8 1/2] timekeeping: Added a function to return tv_sec portion of ktime_get_ts64()
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@...il.com>
>
Reviewed-by: Arnd Bergmann <arnd@...db.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists