diff options
author | Miroslav Lichvar <mlichvar@redhat.com> | 2018-11-09 11:14:44 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-09 19:43:51 -0800 |
commit | 361800876f80da3915c46e388fc682532228b2c3 (patch) | |
tree | 70275bdce7fd76b3142ee743433828670488bade /net/batman-adv | |
parent | 83d0bdc7390b890905634186baaa294475cd6a06 (diff) |
ptp: add PTP_SYS_OFFSET_EXTENDED ioctl
The PTP_SYS_OFFSET ioctl, which can be used to measure the offset
between a PHC and the system clock, includes the total time that the
driver needs to read the PHC timestamp.
This typically involves reading of multiple PCI registers (sometimes in
multiple iterations) and the register that contains the lowest bits of
the timestamp is not read in the middle between the two readings of the
system clock. This asymmetry causes the measured offset to have a
significant error.
Introduce a new ioctl, driver function, and helper functions, which
allow the reading of the lowest register to be isolated from the other
readings in order to reduce the asymmetry. The ioctl returns three
timestamps for each measurement:
- system time right before reading the lowest bits of the PHC timestamp
- PHC time
- system time immediately after reading the lowest bits of the PHC
timestamp
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv')
0 files changed, 0 insertions, 0 deletions