[PATCH 6/6] cputime: Introduce cputime_to_timespec64()/timespec64_to_cputime()

Baolin Wang baolin.wang at linaro.org
Wed Jul 15 21:42:26 AEST 2015

On 15 July 2015 at 18:31, Thomas Gleixner <tglx at linutronix.de> wrote:
> On Wed, 15 Jul 2015, Baolin Wang wrote:
>> The cputime_to_timespec() and timespec_to_cputime() functions are
>> not year 2038 safe on 32bit systems due to that the struct timepsec
>> will overflow in 2038 year.
> And how is this relevant? cputime is not based on wall clock time at
> all. So what has 2038 to do with cputime?
> We want proper explanations WHY we need such a change.

When converting the posix-cpu-timers, it call the
cputime_to_timespec() function. Thus it need a conversion for this
You can see that conversion in patch "posix-cpu-timers: Convert to
y2038 safe callbacks" from
And I also will explain this in the changelog. Thanks for your comments.

> Thanks,
>         tglx

Best Regards

More information about the Linuxppc-dev mailing list