<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/ptp/ptp_clock.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-08-01T22:22:55Z</updated>
<entry>
<title>ptp: introduce ptp auxiliary worker</title>
<updated>2017-08-01T22:22:55Z</updated>
<author>
<name>Grygorii Strashko</name>
</author>
<published>2017-07-28T22:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d9535cb7b7603aeb549c697ecdf92024e4d0a650'/>
<id>urn:sha1:d9535cb7b7603aeb549c697ecdf92024e4d0a650</id>
<content type='text'>
Many PTP drivers required to perform some asynchronous or periodic work,
like periodically handling PHC counter overflow or handle delayed timestamp
for RX/TX network packets. In most of the cases, such work is implemented
using workqueues. Unfortunately, Kernel workqueues might introduce
significant delay in work scheduling under high system load and on -RT,
which could cause misbehavior of PTP drivers due to internal counter
overflow, for example, and there is no way to tune its execution policy and
priority manuallly.

Hence, The kthread_worker can be used insted of workqueues, as it create
separte named kthread for each worker and its its execution policy and
priority can be configured using chrt tool.

This prblem was reported for two drivers TI CPSW CPTS and dp83640, so
instead of modifying each of these driver it was proposed to add PTP
auxiliary worker to the PHC subsystem.

The patch adds PTP auxiliary worker in PHC subsystem using kthread_worker
and kthread_delayed_work and introduces two new PHC subsystem APIs:

- long (*do_aux_work)(struct ptp_clock_info *ptp) callback in
ptp_clock_info structure, which driver should assign if it require to
perform asynchronous or periodic work. Driver should return the delay of
the PTP next auxiliary work scheduling time (&gt;=0) or negative value in case
further scheduling is not required.

- int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay) which
allows schedule PTP auxiliary work.

The name of kthread_worker thread corresponds PTP PHC device name "ptp%d".

Signed-off-by: Grygorii Strashko &lt;grygorii.strashko@ti.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>time: Change posix clocks ops interfaces to use timespec64</title>
<updated>2017-04-14T19:49:54Z</updated>
<author>
<name>Deepa Dinamani</name>
</author>
<published>2017-03-26T19:04:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d340266e19ddb70dbd608f9deedcfb35fdb9d419'/>
<id>urn:sha1:d340266e19ddb70dbd608f9deedcfb35fdb9d419</id>
<content type='text'>
struct timespec is not y2038 safe on 32 bit machines.

The posix clocks apis use struct timespec directly and through struct
itimerspec.

Replace the posix clock interfaces to use struct timespec64 and struct
itimerspec64 instead.  Also fix up their implementations accordingly.

Note that the clock_getres() interface has also been changed to use
timespec64 even though this particular interface is not affected by the
y2038 problem. This helps verification for internal kernel code for y2038
readiness by getting rid of time_t/ timeval/ timespec.

Signed-off-by: Deepa Dinamani &lt;deepa.kernel@gmail.com&gt;
Cc: arnd@arndb.de
Cc: y2038@lists.linaro.org
Cc: netdev@vger.kernel.org
Cc: Richard Cochran &lt;richardcochran@gmail.com&gt;
Cc: john.stultz@linaro.org
Link: http://lkml.kernel.org/r/1490555058-4603-3-git-send-email-deepa.kernel@gmail.com
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
</entry>
<entry>
<title>ptp: create "pins" together with the rest of attributes</title>
<updated>2017-02-17T16:03:06Z</updated>
<author>
<name>Dmitry Torokhov</name>
</author>
<published>2017-02-14T18:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=85a66e55019583da1e0f18706b7a8281c9f6de5b'/>
<id>urn:sha1:85a66e55019583da1e0f18706b7a8281c9f6de5b</id>
<content type='text'>
Let's switch to using device_create_with_groups(), which will allow us to
create "pins" attribute group together with the rest of ptp device
attributes, and before userspace gets notified about ptp device creation.

Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: do not explicitly set drvdata in ptp_clock_register()</title>
<updated>2017-02-17T16:03:05Z</updated>
<author>
<name>Dmitry Torokhov</name>
</author>
<published>2017-02-14T18:23:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=882f312dc0751c973db26478f07f082c584d16aa'/>
<id>urn:sha1:882f312dc0751c973db26478f07f082c584d16aa</id>
<content type='text'>
We do not need explicitly call dev_set_drvdata(), as it is done for us by
device_create().

Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: Introduce a high resolution frequency adjustment method.</title>
<updated>2016-11-10T02:19:53Z</updated>
<author>
<name>Richard Cochran</name>
</author>
<published>2016-11-08T21:49:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d8d26354191399627bac9cf0da0667b0f5178686'/>
<id>urn:sha1:d8d26354191399627bac9cf0da0667b0f5178686</id>
<content type='text'>
The internal PTP Hardware Clock (PHC) interface limits the resolution for
frequency adjustments to one part per billion.  However, some hardware
devices allow finer adjustment, and making use of the increased resolution
improves synchronization measurably on such devices.

This patch adds an alternative method that allows finer frequency tuning
by passing the scaled ppm value to PHC drivers.  This value comes from
user space, and it has a resolution of about 0.015 ppb.  We also deprecate
the older method, anticipating its removal once existing drivers have been
converted over.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Suggested-by: Ulrik De Bie &lt;ulrik.debie-os@e2big.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: Fix resource leak in case of error</title>
<updated>2016-10-04T01:54:10Z</updated>
<author>
<name>Christophe Jaillet</name>
</author>
<published>2016-10-02T07:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b9118b7221ebb12156d2b08d4d5647bc6076d6bb'/>
<id>urn:sha1:b9118b7221ebb12156d2b08d4d5647bc6076d6bb</id>
<content type='text'>
A call to 'ida_simple_remove()' is missing in the error handling path.

This as been spotted with the following coccinelle script which tries to
detect missing 'ida_simple_remove()' call in error handling paths.

///////////////
@@
expression x;
identifier l;
@@

*   x = ida_simple_get(...);
    ...
    if (...) {
    ...
    }
    ...
    if (...) {
       ...
       goto l;
    }
    ...
*   l: ... when != ida_simple_remove(...);

Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Acked-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: remove 32 bit get/set methods.</title>
<updated>2015-03-31T16:01:19Z</updated>
<author>
<name>Richard Cochran</name>
</author>
<published>2015-03-29T21:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ed7c6317bc599502e1fdc7f5f95cb9a5550360a4'/>
<id>urn:sha1:ed7c6317bc599502e1fdc7f5f95cb9a5550360a4</id>
<content type='text'>
All of the PHC drivers have been converted to the new methods.  This patch
converts the three remaining callers within the core code and removes the
older methods for good.  As a result, the core PHC code is ready for the
year 2038.  However, some of the PHC drivers are not quite ready yet.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: use the 64 bit get/set time methods for the posix clock.</title>
<updated>2015-03-31T16:01:16Z</updated>
<author>
<name>Richard Cochran</name>
</author>
<published>2015-03-29T21:11:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d7d38f5bd7bece539a6cbb59fc8121f29f63fbdb'/>
<id>urn:sha1:d7d38f5bd7bece539a6cbb59fc8121f29f63fbdb</id>
<content type='text'>
This patch changes the posix clock code to prefer the new methods
whenever they are implemented by the PHC drivers.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: validate the requested frequency adjustment.</title>
<updated>2014-04-28T17:28:43Z</updated>
<author>
<name>Richard Cochran</name>
</author>
<published>2014-04-27T13:01:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d39a743511cdb80884b4b9cd506fe84b6b08e66e'/>
<id>urn:sha1:d39a743511cdb80884b4b9cd506fe84b6b08e66e</id>
<content type='text'>
PTP Hardware Clock drivers specify a maximum frequency adjustment that
their clocks can accommodate. Normally, user space programs will want to
respect the advertised limits. However, no kernel or driver code checks
that the dialed frequency offset is within the bounds, and out of range
values can lead to surprising results.

This patch fixes the issue by rejecting bad values.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ptp: introduce programmable pins.</title>
<updated>2014-03-21T18:21:13Z</updated>
<author>
<name>Richard Cochran</name>
</author>
<published>2014-03-20T21:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6092315dfdec5185881605d15a0e200d6e90eb66'/>
<id>urn:sha1:6092315dfdec5185881605d15a0e200d6e90eb66</id>
<content type='text'>
This patch adds a pair of new ioctls to the PTP Hardware Clock device
interface. Using the ioctls, user space programs can query each pin to
find out its current function and also reprogram a different function
if desired.

Signed-off-by: Richard Cochran &lt;richardcochran@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
