<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/include/linux/pps_kernel.h, branch v4.4.153</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.153</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.4.153'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-10-01T16:59:16Z</updated>
<entry>
<title>ntp/pps: use y2038 safe types in pps_event_time</title>
<updated>2015-10-01T16:59:16Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-09-28T20:21:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ade1bdffe90e59cd257cb9bd4f5abe4de5f14911'/>
<id>urn:sha1:ade1bdffe90e59cd257cb9bd4f5abe4de5f14911</id>
<content type='text'>
The pps_event_time uses two 'timespec' structures internally, which
suffer from the y2038 problem. The uses of this structure are
fairly self-contained in the pps code, so this replaces them all at
once.

Unfortunately, this includes the sfc ethernet driver aside from the
pps subsystem, so we change that one as well. Both touch the
same data structure, and there probably is no good way to split
the patch into smaller units.

Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>ntp/pps: replace getnstime_raw_and_real with 64-bit version</title>
<updated>2015-10-01T16:59:01Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2015-09-28T20:21:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=071eee45b1650d53d21c636d344bdcebd4577ed2'/>
<id>urn:sha1:071eee45b1650d53d21c636d344bdcebd4577ed2</id>
<content type='text'>
There is exactly one caller of getnstime_raw_and_real in the kernel,
which is the pps_get_ts function. This changes the caller and
the implementation to work on timespec64 types rather than timespec,
to avoid the time_t overflow on 32-bit architectures.

For consistency with the other new functions (ktime_get_seconds,
ktime_get_real_*, ...), I'm renaming the function to
ktime_get_raw_and_real_ts64.

We still need to convert from the internal 64-bit type to 32 bit
types in the caller, but this conversion is now pushed out from
getnstime_raw_and_real to pps_get_ts. A follow-up patch changes
the remaining pps code to completely avoid the conversion.

Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
Reviewed-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: John Stultz &lt;john.stultz@linaro.org&gt;
</content>
</entry>
<entry>
<title>PPS: convert class code to use dev_groups</title>
<updated>2013-08-20T04:22:34Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-07-24T22:05:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bd0eae4e1cd5c4ff7c2a9ebcb3e78ea4631251ef'/>
<id>urn:sha1:bd0eae4e1cd5c4ff7c2a9ebcb3e78ea4631251ef</id>
<content type='text'>
The dev_attrs field of struct class is going away soon, dev_groups
should be used instead.  This converts the pps class code to use the
correct field.

Cc: Rodolfo Giometti &lt;giometti@enneenne.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pps: Add pps_lookup_dev() function</title>
<updated>2013-02-13T17:40:35Z</updated>
<author>
<name>George Spelvin</name>
<email>linux@horizon.com</email>
</author>
<published>2013-02-10T09:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=513b032c98b4b9414aa4e9b4a315cb1bf0380101'/>
<id>urn:sha1:513b032c98b4b9414aa4e9b4a315cb1bf0380101</id>
<content type='text'>
The PPS serial line discipline wants to attach a PPS device to a tty
without changing the tty code to add a struct pps_device * pointer.

Since the number of PPS devices in a typical system is generally very low
(n=1 is by far the most common), it's practical to search the entire list
of allocated pps devices.  (We capture the timestamp before the lookup,
so the timing isn't affected.)

It is a bit ugly that this function, which is part of the in-kernel
PPS API, has to be in pps.c as opposed to kapi,c, but that's not
something that affects users.

Signed-off-by: George Spelvin &lt;linux@horizon.com&gt;
Acked-by: Rodolfo Giometti &lt;giometti@enneenne.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pps/ptp: Allow PHC devices to adjust PPS events for known delay</title>
<updated>2012-09-07T20:13:28Z</updated>
<author>
<name>Ben Hutchings</name>
<email>bhutchings@solarflare.com</email>
</author>
<published>2012-09-03T10:34:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=220a60a425146b0e37998cc0b3082f0541aad866'/>
<id>urn:sha1:220a60a425146b0e37998cc0b3082f0541aad866</id>
<content type='text'>
Initial version by Stuart Hodgson &lt;smhodgson@solarflare.com&gt;

Some PHC device drivers may deliver PPS events with a significant
and variable delay, but still be able to measure precisely what
that delay is.

Add a pps_sub_ts() function for subtracting a delay from the
timestamp(s) in a PPS event, and a PTP event type (PTP_CLOCK_PPSUSR)
for which the caller provides a complete PPS event.

Signed-off-by: Ben Hutchings &lt;bhutchings@solarflare.com&gt;
</content>
</entry>
<entry>
<title>pps: capture MONOTONIC_RAW timestamps as well</title>
<updated>2011-01-13T16:03:21Z</updated>
<author>
<name>Alexander Gordeev</name>
<email>lasaine@lvk.cs.msu.su</email>
</author>
<published>2011-01-13T01:00:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e2c18e49a0d4f822ffc29fb4958943beb1ff08b7'/>
<id>urn:sha1:e2c18e49a0d4f822ffc29fb4958943beb1ff08b7</id>
<content type='text'>
MONOTONIC_RAW clock timestamps are ideally suited for frequency
calculation and also fit well into the original NTP hardpps design.  Now
phase and frequency can be adjusted separately: the former based on
REALTIME clock and the latter based on MONOTONIC_RAW clock.

A new function getnstime_raw_and_real is added to timekeeping subsystem to
capture both timestamps at the same time and atomically.

Signed-off-by: Alexander Gordeev &lt;lasaine@lvk.cs.msu.su&gt;
Acked-by: John Stultz &lt;johnstul@us.ibm.com&gt;
Cc: Rodolfo Giometti &lt;giometti@enneenne.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pps: access pps device by direct pointer</title>
<updated>2011-01-13T16:03:19Z</updated>
<author>
<name>Alexander Gordeev</name>
<email>lasaine@lvk.cs.msu.su</email>
</author>
<published>2011-01-13T01:00:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5e196d34a776420278e4117b4742cd9d3f2350ed'/>
<id>urn:sha1:5e196d34a776420278e4117b4742cd9d3f2350ed</id>
<content type='text'>
Using device index as a pointer needs some unnecessary work to be done
every time the pointer is needed (in irq handler for example).  Using a
direct pointer is much more easy (and safe as well).

Signed-off-by: Alexander Gordeev &lt;lasaine@lvk.cs.msu.su&gt;
Acked-by: Rodolfo Giometti &lt;giometti@linux.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pps: unify timestamp gathering</title>
<updated>2011-01-13T16:03:19Z</updated>
<author>
<name>Alexander Gordeev</name>
<email>lasaine@lvk.cs.msu.su</email>
</author>
<published>2011-01-13T01:00:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6f4229b51106cbc859e9d8209b22c8a2ec749e64'/>
<id>urn:sha1:6f4229b51106cbc859e9d8209b22c8a2ec749e64</id>
<content type='text'>
Add a helper function to gather timestamps.  This way clients don't have
to duplicate it.

Signed-off-by: Alexander Gordeev &lt;lasaine@lvk.cs.msu.su&gt;
Acked-by: Rodolfo Giometti &lt;giometti@linux.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pps: fix race in PPS_FETCH handler</title>
<updated>2011-01-13T16:03:19Z</updated>
<author>
<name>Alexander Gordeev</name>
<email>lasaine@lvk.cs.msu.su</email>
</author>
<published>2011-01-13T01:00:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3003d55b59aa98aeaff2773df69732b27c0cbf6a'/>
<id>urn:sha1:3003d55b59aa98aeaff2773df69732b27c0cbf6a</id>
<content type='text'>
There was a race in PPS_FETCH ioctl handler when several processes want to
obtain PPS data simultaneously using sleeping PPS_FETCH.  They all sleep
most of the time in the system call.

With the old approach when the first process waiting on the pps queue is
waken up it makes new system call right away and zeroes pps-&gt;go.  So other
processes continue to sleep.  This is a clear race condition because of
the global 'go' variable.

With the new approach pps-&gt;last_ev holds some value increasing at each PPS
event.  PPS_FETCH ioctl handler saves current value to the local variable
at the very beginning so it can safely check that there is a new event by
just comparing both variables.

Signed-off-by: Alexander Gordeev &lt;lasaine@lvk.cs.msu.su&gt;
Acked-by: Rodolfo Giometti &lt;giometti@linux.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pps: trivial fixes</title>
<updated>2011-01-13T16:03:19Z</updated>
<author>
<name>Alexander Gordeev</name>
<email>lasaine@lvk.cs.msu.su</email>
</author>
<published>2011-01-13T01:00:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7a21a3cc0be92e70474cc2ab06cb074f6a7c3f09'/>
<id>urn:sha1:7a21a3cc0be92e70474cc2ab06cb074f6a7c3f09</id>
<content type='text'>
Here are some very trivial fixes combined:

- add macro definitions to protect header file from including several times

- remove declaration for an unexistent array

- fix typos

Signed-off-by: Alexander Gordeev &lt;lasaine@lvk.cs.msu.su&gt;
Acked-by: Rodolfo Giometti &lt;giometti@linux.it&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
