<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/time/ntp.c, branch v3.6-rc3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/kernel/time/ntp.c?h=v3.6-rc3</id>
<link rel='self' href='https://git.amat.us/linux/atom/kernel/time/ntp.c?h=v3.6-rc3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-07-31T15:09:12Z</updated>
<entry>
<title>time/jiffies: Rename ACTHZ to SHIFTED_HZ</title>
<updated>2012-07-31T15:09:12Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2012-07-27T18:48:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=02ab20ae38337b99b5c29c81090f594b8fd61283'/>
<id>urn:sha1:02ab20ae38337b99b5c29c81090f594b8fd61283</id>
<content type='text'>
Ingo noted that ACTHZ is a confusing name, and requested it
be renamed, so this patch renames ACTHZ to SHIFTED_HZ to
better describe it.

Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
Link: http://lkml.kernel.org/r/1343414893-45779-3-git-send-email-john.stultz@linaro.org
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntp: Fix STA_INS/DEL clearing bug</title>
<updated>2012-07-15T07:48:49Z</updated>
<author>
<name>John Stultz</name>
<email>johnstul@us.ibm.com</email>
</author>
<published>2012-07-13T05:21:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b1859dba01c7d512b72d77e3fd7da8354235189'/>
<id>urn:sha1:6b1859dba01c7d512b72d77e3fd7da8354235189</id>
<content type='text'>
In commit 6b43ae8a619d17c4935c3320d2ef9e92bdeed05d, I
introduced a bug that kept the STA_INS or STA_DEL bit
from being cleared from time_status via adjtimex()
without forcing STA_PLL first.

Usually once the STA_INS is set, it isn't cleared
until the leap second is applied, so its unlikely this
affected anyone. However during testing I noticed it
took some effort to cancel a leap second once STA_INS
was set.

Signed-off-by: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: Prarit Bhargava &lt;prarit@redhat.com&gt;
CC: stable@vger.kernel.org # 3.4
Link: http://lkml.kernel.org/r/1342156917-25092-2-git-send-email-john.stultz@linaro.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>ntp: Fix a stale comment and a few stray newlines.</title>
<updated>2012-05-21T23:16:56Z</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2012-04-27T08:12:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cd5398bed9296d1ddb21630ac17e90cd19a5c62e'/>
<id>urn:sha1:cd5398bed9296d1ddb21630ac17e90cd19a5c62e</id>
<content type='text'>
Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>ntp: Correct TAI offset during leap second</title>
<updated>2012-05-21T23:16:54Z</updated>
<author>
<name>Richard Cochran</name>
<email>richardcochran@gmail.com</email>
</author>
<published>2012-04-26T12:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dd48d708ff3e917f6d6b6c2b696c3f18c019feed'/>
<id>urn:sha1:dd48d708ff3e917f6d6b6c2b696c3f18c019feed</id>
<content type='text'>
When repeating a UTC time value during a leap second (when the UTC
time should be 23:59:60), the TAI timescale should not stop. The kernel
NTP code increments the TAI offset one second too late. This patch fixes
the issue by incrementing the offset during the leap second itself.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>time: remove no_sync_cmos_clock</title>
<updated>2012-03-23T23:25:20Z</updated>
<author>
<name>Cesar Eduardo Barros</name>
<email>cesarb@cesarb.net</email>
</author>
<published>2012-02-11T19:54:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=335dd85895abeca1957d5eaa3013dfe8dc60c7d7'/>
<id>urn:sha1:335dd85895abeca1957d5eaa3013dfe8dc60c7d7</id>
<content type='text'>
Commit 9863c90f682fba34cdc26c3437e8c00da6c83fa4 (x86, vmware: Remove
deprecated VMI kernel support) removed the only place which set
no_sync_cmos_clock. Since that commit, this variable is never set.

Signed-off-by: Cesar Eduardo Barros &lt;cesarb@cesarb.net&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>ntp: Fix leap-second hrtimer livelock</title>
<updated>2012-03-23T02:43:43Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2012-03-15T20:04:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b43ae8a619d17c4935c3320d2ef9e92bdeed05d'/>
<id>urn:sha1:6b43ae8a619d17c4935c3320d2ef9e92bdeed05d</id>
<content type='text'>
Since commit 7dffa3c673fbcf835cd7be80bb4aec8ad3f51168 the ntp
subsystem has used an hrtimer for triggering the leapsecond
adjustment. However, this can cause a potential livelock.

Thomas diagnosed this as the following pattern:
CPU 0                                                    CPU 1
do_adjtimex()
  spin_lock_irq(&amp;ntp_lock);
    process_adjtimex_modes();				 timer_interrupt()
      process_adj_status();                                do_timer()
        ntp_start_leap_timer();                             write_lock(&amp;xtime_lock);
          hrtimer_start();                                  update_wall_time();
             hrtimer_reprogram();                            ntp_tick_length()
               tick_program_event()                            spin_lock(&amp;ntp_lock);
                 clockevents_program_event()
		   ktime_get()
                     seq = req_seqbegin(xtime_lock);

This patch tries to avoid the problem by reverting back to not using
an hrtimer to inject leapseconds, and instead we handle the leapsecond
processing in the second_overflow() function.

The downside to this change is that on systems that support highres
timers, the leap second processing will occur on a HZ tick boundary,
(ie: ~1-10ms, depending on HZ)  after the leap second instead of
possibly sooner (~34us in my tests w/ x86_64 lapic).

This patch applies on top of tip/timers/core.

CC: Sasha Levin &lt;levinsasha928@gmail.com&gt;
CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reported-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Diagnoised-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Tested-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>ntp: Fix integer overflow when setting time</title>
<updated>2012-03-15T20:41:34Z</updated>
<author>
<name>Sasha Levin</name>
<email>levinsasha928@gmail.com</email>
</author>
<published>2012-03-15T16:36:14Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a078c6d0e6288fad6d83fb6d5edd91ddb7b6ab33'/>
<id>urn:sha1:a078c6d0e6288fad6d83fb6d5edd91ddb7b6ab33</id>
<content type='text'>
'long secs' is passed as divisor to div_s64, which accepts a 32bit
divisor. On 64bit machines that value is trimmed back from 8 bytes
back to 4, causing a divide by zero when the number is bigger than
(1 &lt;&lt; 32) - 1 and all 32 lower bits are 0.

Use div64_long() instead.

Signed-off-by: Sasha Levin &lt;levinsasha928@gmail.com&gt;
Cc: johnstul@us.ibm.com
Link: http://lkml.kernel.org/r/1331829374-31543-2-git-send-email-levinsasha928@gmail.com
Cc: stable@vger.kernel.org
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
</entry>
<entry>
<title>ntp: Add ntp_lock to replace xtime_locking</title>
<updated>2012-01-27T03:44:25Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-11-14T21:48:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bd3312681f69207a40431981c1bce1afdc9b7975'/>
<id>urn:sha1:bd3312681f69207a40431981c1bce1afdc9b7975</id>
<content type='text'>
Use a ntp_lock spin lock to replace xtime_lock locking in ntp.c

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>ntp: Access tick_length variable via ntp_tick_length()</title>
<updated>2012-01-27T03:44:23Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-11-14T21:18:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ea7cf49a7633c2b70125f59b4e3553d9181cb15d'/>
<id>urn:sha1:ea7cf49a7633c2b70125f59b4e3553d9181cb15d</id>
<content type='text'>
Currently the NTP managed tick_length value is accessed globally,
in preparations for locking cleanups, make sure it is accessed via
a function and mark it as static.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>ntp: Cleanup timex.h</title>
<updated>2012-01-27T03:44:20Z</updated>
<author>
<name>John Stultz</name>
<email>john.stultz@linaro.org</email>
</author>
<published>2011-11-14T21:06:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8357929e6ae3661d5a3a7378a717f29873ea18c6'/>
<id>urn:sha1:8357929e6ae3661d5a3a7378a717f29873ea18c6</id>
<content type='text'>
Move ntp_sycned to ntp.c and mark time_status as static.
Also yank function declaration for non-existant function.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
CC: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
CC: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
</feed>
