<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/timekeeping.h, branch v4.0</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.0</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-01-24T01:21:55Z</updated>
<entry>
<title>time: Expose get_monotonic_boottime64 for in-kernel use</title>
<updated>2015-01-24T01:21:55Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2014-12-19T02:04:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2e0c78ee5ba4d777ecf22c8f40cc968b4308ca88'/>
<id>urn:sha1:2e0c78ee5ba4d777ecf22c8f40cc968b4308ca88</id>
<content type='text'>
As part of the 2038 conversion process, add a
get_monotonic_boottime64 accessor so we can depracate
get_monotonic_boottime.

Cc: pang.xunlei &lt;pang.xunlei@linaro.org&gt;
Cc: Arnd Bergmann &lt;arnd.bergmann@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Expose getboottime64 for in-kernel uses</title>
<updated>2015-01-24T01:21:54Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2014-12-08T20:00:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d08c0cdd26d48751c15aa2b4479a410594fee9ac'/>
<id>urn:sha1:d08c0cdd26d48751c15aa2b4479a410594fee9ac</id>
<content type='text'>
Adds a timespec64 based getboottime64() implementation
that can be used as we convert internal users of
getboottime away from using timespecs.

Cc: pang.xunlei &lt;pang.xunlei@linaro.org&gt;
Cc: Arnd Bergmann &lt;arnd.bergmann@linaro.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip</title>
<updated>2014-12-10T18:13:28Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-12-10T18:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d82012695ef29e4e1c8153ccf43098ec8e50369e'/>
<id>urn:sha1:d82012695ef29e4e1c8153ccf43098ec8e50369e</id>
<content type='text'>
Pull more 2038 timer work from Thomas Gleixner:
 "Two more patches for the ongoing 2038 work:

   - New accessors to clock MONOTONIC and REALTIME seconds

  This is a seperate branch as Arnd has follow up work depending on
  this"

* 'timers-2038-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Provide y2038 safe accessor to the seconds portion of CLOCK_REALTIME
  timekeeping: Provide fast accessor to the seconds part of CLOCK_MONOTONIC
</content>
</entry>
<entry>
<title>time: Remove timekeeping_inject_sleeptime()</title>
<updated>2014-11-21T20:00:01Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2014-11-21T05:19:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=21b6c0512e8aca75ce76365e1aef9fb16e007100'/>
<id>urn:sha1:21b6c0512e8aca75ce76365e1aef9fb16e007100</id>
<content type='text'>
Since all users have been converted to using the 64bit
timekeeping_inject_sleeptime64(), remove the old y2038
problematic timekeeping_inject_sleeptime().

Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Expose get_monotonic_coarse64() for in-kernel uses</title>
<updated>2014-11-21T19:59:59Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2014-11-07T19:20:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=334334b5f577a2255e29d2352d53197d9b796511'/>
<id>urn:sha1:334334b5f577a2255e29d2352d53197d9b796511</id>
<content type='text'>
Adds a timespec64 based get_monotonic_coarse64() implementation
that can be used as we convert internal users of
get_monotonic_coarse away from using timespecs.

Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Expose getrawmonotonic64 for in-kernel uses</title>
<updated>2014-11-21T19:59:58Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2014-11-07T19:03:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=cdba2ec538d9843c42cac15ff4ec54dc2ac53f8a'/>
<id>urn:sha1:cdba2ec538d9843c42cac15ff4ec54dc2ac53f8a</id>
<content type='text'>
Adds a timespec64 based getrawmonotonic64() implementation
that can be used as we convert internal users of
getrawmonotonic away from using timespecs.

Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Provide y2038 safe timekeeping_inject_sleeptime() replacement</title>
<updated>2014-11-21T19:59:57Z</updated>
<author>
<name>pang.xunlei</name>
<email>pang.xunlei@linaro.org</email>
</author>
<published>2014-11-18T11:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=04d9089086a8231ddc69a9f3f25e971a3c1d25e6'/>
<id>urn:sha1:04d9089086a8231ddc69a9f3f25e971a3c1d25e6</id>
<content type='text'>
As part of addressing "y2038 problem" for in-kernel uses, this
patch adds timekeeping_inject_sleeptime64() using timespec64.

After this patch, timekeeping_inject_sleeptime() is deprecated
and all its call sites will be fixed using the new interface,
after that it can be removed.

NOTE: timekeeping_inject_sleeptime() is safe actually, but we
want to eliminate timespec eventually, so comes this patch.

Signed-off-by: pang.xunlei &lt;pang.xunlei@linaro.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: Provide y2038 safe do_settimeofday() replacement</title>
<updated>2014-11-21T19:59:57Z</updated>
<author>
<name>pang.xunlei</name>
<email>pang.xunlei@linaro.org</email>
</author>
<published>2014-11-18T11:15:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=21f7eca555ad14e7c7b2cb59a6c6252e74ee5c8b'/>
<id>urn:sha1:21f7eca555ad14e7c7b2cb59a6c6252e74ee5c8b</id>
<content type='text'>
The kernel uses 32-bit signed value(time_t) for seconds elapsed
1970-01-01:00:00:00, thus it will overflow at 2038-01-19 03:14:08
on 32-bit systems. This is widely known as the y2038 problem.

As part of addressing "y2038 problem" for in-kernel uses, this patch
adds safe do_settimeofday64() using timespec64.

After this patch, do_settimeofday() is deprecated and all its call
sites will be fixed using do_settimeofday64(), after that it can be
removed.

Signed-off-by: pang.xunlei &lt;pang.xunlei@linaro.org&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>timekeeping: Provide y2038 safe accessor to the seconds portion of CLOCK_REALTIME</title>
<updated>2014-10-29T14:15:40Z</updated>
<author>
<name>Heena Sirwani</name>
<email>heenasirwani@gmail.com</email>
</author>
<published>2014-10-29T10:31:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=dbe7aa622db96b5cd601f59d09c4f00b98b76079'/>
<id>urn:sha1:dbe7aa622db96b5cd601f59d09c4f00b98b76079</id>
<content type='text'>
ktime_get_real_seconds() is the replacement function for get_seconds()
returning the seconds portion of CLOCK_REALTIME in a time64_t. For
64bit the function is equivivalent to get_seconds(), but for 32bit it
protects the readout with the timekeeper sequence count. This is
required because 32-bit machines cannot access 64-bit tk-&gt;xtime_sec
variable atomically.

[tglx: Massaged changelog and added docbook comment ]

Signed-off-by: Heena Sirwani &lt;heenasirwani@gmail.com&gt;
Reviewed-by: Arnd Bergman &lt;arnd@arndb.de&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: opw-kernel@googlegroups.com
Link: http://lkml.kernel.org/r/7adcfaa8962b8ad58785d9a2456c3f77d93c0ffb.1414578445.git.heenasirwani@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>timekeeping: Provide fast accessor to the seconds part of CLOCK_MONOTONIC</title>
<updated>2014-10-29T14:15:40Z</updated>
<author>
<name>Heena Sirwani</name>
<email>heenasirwani@gmail.com</email>
</author>
<published>2014-10-29T10:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9e3680b1750b9a62680b0262c9f438de98b77655'/>
<id>urn:sha1:9e3680b1750b9a62680b0262c9f438de98b77655</id>
<content type='text'>
This is the counterpart to get_seconds() based on CLOCK_MONOTONIC. The
use case for this interface are kernel internal coarse grained
timestamps which do neither require the nanoseconds fraction of
current time nor the CLOCK_REALTIME properties. Such timestamps can
currently only retrieved by calling ktime_get_ts64() and using the
tv_sec field of the returned timespec64. That's inefficient as it
involves the read of the clocksource, math operations and must be
protected by the timekeeper sequence counter.

To avoid the sequence counter protection we restrict the return value
to unsigned 32bit on 32bit machines. This covers ~136 years of uptime
and therefor an overflow is not expected to hit anytime soon.

To avoid math in the function we calculate the current seconds portion
of CLOCK_MONOTONIC when the timekeeper gets updated in
tk_update_ktime_data() similar to the CLOCK_REALTIME counterpart
xtime_sec.

[ tglx: Massaged changelog, simplified and commented the update
  	function, added docbook comment ]

Signed-off-by: Heena Sirwani &lt;heenasirwani@gmail.com&gt;
Reviewed-by: Arnd Bergman &lt;arnd@arndb.de&gt;
Cc: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: opw-kernel@googlegroups.com
Link: http://lkml.kernel.org/r/da0b63f4bdf3478909f92becb35861197da3a905.1414578445.git.heenasirwani@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
</feed>
