From: David S. Miller Date: Sat, 10 Nov 2018 03:43:51 +0000 (-0800) Subject: Merge branch 'ptp-more-accurate-PHC-system-clock-synchronization' X-Git-Tag: v5.4-rc1~1957^2~340 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f2bba7d681b4bc38a7421940b8c2472f41711e4;p=platform%2Fkernel%2Flinux-rpi.git Merge branch 'ptp-more-accurate-PHC-system-clock-synchronization' Miroslav Lichvar says: ==================== More accurate PHC<->system clock synchronization RFC->v1: - added new patches - separated PHC timestamp from ptp_system_timestamp - fixed memory leak in PTP_SYS_OFFSET_EXTENDED - changed PTP_SYS_OFFSET_EXTENDED to work with array of arrays - fixed PTP_SYS_OFFSET_EXTENDED to break correctly from loop - fixed timecounter updates in drivers - split gettimex in igb driver - fixed ptp_read_* functions to be available without CONFIG_PTP_1588_CLOCK This series enables a more accurate synchronization between PTP hardware clocks and the system clock. The first two patches are minor cleanup/bug fixes. The third patch adds an extended version of the PTP_SYS_OFFSET ioctl, which returns three timestamps for each measurement. The idea is to shorten the interval between the system timestamps to contain just the reading of the lowest register of the PHC in order to reduce the error in the measured offset and get a smaller upper bound on the maximum error. The fourth patch deprecates the original gettime function. The remaining patches update the gettime function in order to support the new ioctl in the e1000e, igb, ixgbe, and tg3 drivers. Tests with few different NICs in different machines show that: - with an I219 (e1000e) the measured delay was reduced from 2500 to 1300 ns and the error in the measured offset, when compared to the cross timestamping supported by the driver, was reduced by a factor of 5 - with an I210 (igb) the delay was reduced from 5100 to 1700 ns - with an I350 (igb) the delay was reduced from 2300 to 750 ns - with an X550 (ixgbe) the delay was reduced from 1950 to 650 ns - with a BCM5720 (tg3) the delay was reduced from 2400 to 1200 ns ==================== Acked-by: Richard Cochran Signed-off-by: David S. Miller --- 3f2bba7d681b4bc38a7421940b8c2472f41711e4