Commit Graph

18 Commits

Author SHA1 Message Date
Shuah Khan
8dbbf85420 selftests: move ptp tests from Documentation/ptp
Remove ptp from Makefile to move the test to selftests. Update ptp Makefile
to work under selftests. ptp will not be run as part of selftests suite and
will not be included in install targets. They can be built separately for
now.

Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2016-09-20 09:54:38 -06:00
Linus Torvalds
37aa7319cd Another relatively boring cycle for the docs tree: typo fixes, translation
updates, etc.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJW6IqKAAoJEI3ONVYwIuV6zawP/2NG5Rh9a/6B9YbtVsXZrWD+
 wCK80j+tbH9yAba54GjdJ2nvMKSYpC62ti4sPwtdSllvd0/e2ZnS4ZLa9sSoMDsH
 GK10mYhUcosDfeNCadT66Wl9o8ICu2QqNvGUtjI1331dcjAKBxLjJfaVQ9nddcdP
 Ksr8+ATr1rQE8YfxdprOnaX06C0FKqaQfRWdBl4FNDh6pb6eeXWnP56A+m3zi7e8
 R2uJGlHwxq3qS27JkQDwiWFb7FVPt1H6bfM9DcgiGfItfgoosW1cExxND4MoqEZT
 8ATE1H4Zbn6QOkq88Wo4vDn3gDIsgy7D7rS69juFNzCajxIOaN8NfPusGFmTCpQU
 cuh6XDYKS2n05RU0tuLB9NxTd+1b50COVHD//dEhjvpF+Z7Ku6yM2LrhTYYvoAsm
 XFYUUrJ8i09D0hllRA8WGE+AYGLvyFV9AE1mJQPepx+9TjBluKuqIoig03kEWfof
 3xXhigFy+WttLQZiqten3YMVSo4xQRNq7FgqZ20dPMF1Exnj1wkwDFrE3SBB3Xcv
 3eN953O12JzL7ja+9/OPMKZt8xs/tzLAScMP4R/nXGG050aecRH/xFFrOlzPDdyQ
 oshon67cMGi5qJdHaOkALqwz89euXv/AMHxGixu1M0zJG81WQm1u6vi9lY7b8Y3q
 ojA8vgsG3AprS9nmxqVh
 =wBKa
 -----END PGP SIGNATURE-----

Merge tag 'docs-for-linus' of git://git.lwn.net/linux

Pul documentation update from Jon Corbet:
 "Another relatively boring cycle for the docs tree: typo fixes,
  translation updates, etc"

* tag 'docs-for-linus' of git://git.lwn.net/linux:
  modsign: Fix documentation on module signing enforcement parameter.
  Doc: nfs: Fix typos in Documentation/filesystems/nfs
  Documentation: kselftest: Remove duplicate word
  doc: fix grammar
  Documentation: Howto: Fixed subtitles style
  Doc: ARM: Fix a typo in clksrc-change-registers.awk
  Documentation/ko_KR: update maintainer information
  Documentation: Fix int/unsigned int comparison
  Documentation: Chinese translation of arm64/silicon-errata.txt
  Documentation:Update Documentation/zh_CN/arm64/booting.txt
  Documentation: HOWTO: remove obsolete info about regression postings
  Doc: ja_JP: Fix a typo in HOWTO
  Doc: i2c: Fix typo in Documentation/i2c
  Doc: DocBook: Fix a typo in device-drivers.tmpl
  Remove "arch" usage in Documentation/features/list-arch.sh
  README: cosmetic fixes
  Documentation/CodingStyle: add space before parenthesis in example macro
  SubmittingPatches: fix spelling of "git send-email"
2016-03-17 12:09:35 -07:00
Christopher S. Hall
719f1aa4a6 ptp: Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping
Currently, network /system cross-timestamping is performed in the
PTP_SYS_OFFSET ioctl. The PTP clock driver reads gettimeofday() and
the gettime64() callback provided by the driver. The cross-timestamp
is best effort where the latency between the capture of system time
(getnstimeofday()) and the device time (driver callback) may be
significant.

The getcrosststamp() callback and corresponding PTP_SYS_OFFSET_PRECISE
ioctl allows the driver to perform this device/system correlation when
for example cross timestamp hardware is available. Modern Intel
systems can do this for onboard Ethernet controllers using the ART
counter. There is virtually zero latency between captures of the ART
and network device clock.

The capabilities ioctl (PTP_CLOCK_GETCAPS), is augmented allowing
applications to query whether or not drivers implement the
getcrosststamp callback, providing more precise cross timestamping.

Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: kevin.b.stanton@intel.com
Cc: kevin.j.clarke@intel.com
Cc: hpa@zytor.com
Cc: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Christopher S. Hall <christopher.s.hall@intel.com>
[jstultz: Commit subject tweaks]
Signed-off-by: John Stultz <john.stultz@linaro.org>
2016-03-03 14:23:43 -08:00
Mahesh Khanwalkar
f0cd147e61 Documentation: Fix int/unsigned int comparison
Signed int - unsigned int comparison fixed in mpssd, prctl, ptp, and
timers in Documentation. In places where 'int argc' and 'const char
**argv' are not used, they are replaced with void

Documentation/mic/mpssd/mpssd.c: Fixed comparison in sum_iovec_len and
disp_iovec

Documentation/prctl/disable-tsc-ctxt-sw-stress-test.c: main signature
changed to void, as parameters 'argc' and 'argv' are never used

Documentation/prctl/disable-tsc-on-off-stress-test.c: main signature
changed to void

Documentation/prctl/disable-tsc-test.c: main signature changed to void

Documentation/ptp/testptp.c: Sign comparison fix
Documentation/timers/hpet_example.c: Sign comparision fix

Signed-off-by: Mahesh Khanwalkar <maheshkhanwalkar@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2016-02-17 14:09:43 -07:00
Thomas Huth
9ae6d4935e testptp: Silence compiler warnings on ppc64
When compiling Documentation/ptp/testptp.c the following compiler
warnings are printed out:

Documentation/ptp/testptp.c: In function ‘main’:
Documentation/ptp/testptp.c:367:11: warning: format ‘%lld’ expects argument
    of type ‘long long int’, but argument 3 has type ‘__s64’ [-Wformat=]
           event.t.sec, event.t.nsec);
           ^
Documentation/ptp/testptp.c:505:5: warning: format ‘%lld’ expects argument
    of type ‘long long int’, but argument 2 has type ‘__s64’ [-Wformat=]
     (pct+2*i)->sec, (pct+2*i)->nsec);
     ^
Documentation/ptp/testptp.c:507:5: warning: format ‘%lld’ expects argument
    of type ‘long long int’, but argument 2 has type ‘__s64’ [-Wformat=]
     (pct+2*i+1)->sec, (pct+2*i+1)->nsec);
     ^
Documentation/ptp/testptp.c:509:5: warning: format ‘%lld’ expects argument
    of type ‘long long int’, but argument 2 has type ‘__s64’ [-Wformat=]
     (pct+2*i+2)->sec, (pct+2*i+2)->nsec);

This happens because __s64 is by default defined as "long" on ppc64,
not as "long long". However, to fix these warnings, it's possible to
define the __SANE_USERSPACE_TYPES__ so that __s64 gets defined to
"long long" on ppc64, too.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-09-29 21:16:56 -07:00
Richard Cochran
5345c1d417 ptp: restore the makefile for building the test program.
This patch brings back the makefile called testptp.mk which was removed
in commit adb19fb66e (Documentation: add makefiles for more targets).

While the idea of that commit was to improve build coverage of the
examples, the new Makefile is unable to cross compile the testptp program.
In contrast, the deleted makefile was able to do this just fine.

This patch fixes the regression by restoring the original makefile.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Peter Foley <pefoley2@pefoley.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-24 16:07:10 -04:00
Peter Foley
c5e2a7e012 Documentation: update .gitignore files
Add some missing files to .gitignore.
Push Documentation/.gitignore down into subdirectories.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-26 11:02:59 +02:00
Peter Foley
6ab0e475f1 Documentation: fix misc. warnings
Fix a few warnings that gcc emits during a default build.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-26 11:02:57 +02:00
Peter Foley
adb19fb66e Documentation: add makefiles for more targets
Add a bunch of previously unbuilt source files to the Documentation build
machinery.

Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2014-09-26 11:02:56 +02:00
Christian Riesch
42e1358e10 ptp: In the testptp utility, use clock_adjtime from glibc when available
clock_adjtime was included in glibc 2.14. _GNU_SOURCE must be defined
to make it available.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Richard Cochran <richardcochran@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-06-16 21:32:31 -07:00
Christian Riesch
4ec54f9573 ptp: Fix compiler warnings in the testptp utility
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Dong Zhu <bluezhudong@gmail.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-27 14:51:47 -04:00
David S. Miller
031fe792cc Revert "ptp: Fix compiler warnings in the testptp utility"
This reverts commit 203191c386.

A better version of this fix is forthcoming.

Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-27 14:51:26 -04:00
Christian Riesch
203191c386 ptp: Fix compiler warnings in the testptp utility
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Cc: Dong Zhu <bluezhudong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-26 16:43:36 -04:00
Manfred Rudigier
271c83de61 ptp: Add a command line option in testptp to set a specific PTP time
Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at>
Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-26 16:43:36 -04:00
Richard Cochran
888a36871e ptp: add the pin GET/SETFUNC ioctls to the testptp program.
This patch adds a option to the test program that lists the
programmable pins on a PTP Hardware Clock device, assuming there
are any such pins. A second option lets the user reprogram the
auxiliary function of a single pin.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-03-21 14:21:14 -04:00
Stefan Sørensen
61950e82b3 ptp: Allow selecting trigger/event index in testptp
Currently the trigger/event is hardcoded to 0, this patch adds
a new command line argument -i to select an arbitrary trigger/
event.

Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-02-04 20:26:46 -08:00
Dong Zhu
568ebc5985 ptp: add the PTP_SYS_OFFSET ioctl to the testptp program
This patch add a method into testptp.c to measure the time offset
between phc and system clock through the ioctl PTP_SYS_OFFSET.

Signed-off-by: Dong Zhu <bluezhudong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-09-23 16:46:17 -04:00
Richard Cochran
d94ba80ebb ptp: Added a brand new class driver for ptp clocks.
This patch adds an infrastructure for hardware clocks that implement
IEEE 1588, the Precision Time Protocol (PTP). A class driver offers a
registration method to particular hardware clock drivers. Each clock is
presented as a standard POSIX clock.

The ancillary clock features are exposed in two different ways, via
the sysfs and by a character device.

Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: John Stultz <john.stultz@linaro.org>
2011-05-23 13:01:00 -07:00