Re: [PATCH v7 6/8] x86: tsc: Always Running Timer (ART) correlated clocksource

2016-02-22 Thread Christopher Hall
On Thu, 18 Feb 2016 13:11:33 -0800, Andy Lutomirski wrote: +#define X86_FEATURE_INVARIANT_TSC (7*32+4) /* Intel Invariant TSC */ This is removed. It was basically an alias for NONSTOP_TSC and not needed. +/* + * Convert ART to TSC given numerator/denominator found in

Re: [PATCH v7 0/8] Patchset enabling hardware based cross-timestamps for next gen Intel platforms

2016-02-22 Thread Christopher Hall
On Thu, 18 Feb 2016 11:26:24 -0800, John Stultz wrote: On Fri, Feb 12, 2016 at 12:25 PM, Christopher S. Hall wrote: Modern Intel hardware adds an Always Running Timer (ART) that allows the network and audio device clocks to precisely

Re: [PATCH v7 3/8] time: Remove duplicated code in ktime_get_raw_and_real()

2016-02-16 Thread Christopher Hall
On Mon, 15 Feb 2016 23:52:10 -0800, Richard Cochran wrote: @@ -888,6 +888,8 @@ void ktime_get_snapshot(struct system_time_snapshot *systime_snapshot) s64 nsec_real; cycle_t now; + WARN_ON(timekeeping_suspended); ... -

Re: [RFC v5 5/6] Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping

2016-01-06 Thread Christopher Hall
Hi Richard, This all sounds fine. Thanks for the feedback. I'll roll this into the next patchset. Chris On Tue, 05 Jan 2016 07:27:32 -0800, Richard Cochran wrote: On Mon, Jan 04, 2016 at 04:45:22AM -0800, Christopher S. Hall wrote: + case

Re: [PATCH v4 3/4] Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping

2015-11-06 Thread Christopher Hall
Richard/Thomas: On Tue, 13 Oct 2015 06:59:26 -0700, Richard Cochran wrote: On Mon, Oct 12, 2015 at 11:45:21AM -0700, Christopher S. Hall wrote: +struct ptp_sys_offset_precise { + unsigned int rsv[4];/* Reserved for future use. */ + struct

Re: [PATCH v4 1/4] Produce system time from correlated clocksource

2015-10-19 Thread Christopher Hall
Thomas, On Thu, 15 Oct 2015 01:15:57 -0700, Thomas Gleixner wrote: > > > +#define SHADOW_HISTORY_DEPTH 7 > > And that number is 7 because? Due to power of 2 it will be 8 instead. As above the useful history is 8-2*1 ms (1 ms is the minimum jiffy length). Array size 4

Re: [PATCH v4 1/4] Produce system time from correlated clocksource

2015-10-14 Thread Christopher Hall
Thomas, On Tue, 13 Oct 2015 12:42:52 -0700, Thomas Gleixner wrote: On Mon, 12 Oct 2015, Christopher S. Hall wrote: audio. This wants to be a seperate patch, really. OK. This makes sense, I'll do this the next time. +/* This needs to be 3 or greater for backtracking

Re: [PATCH v4 3/4] Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping

2015-10-14 Thread Christopher Hall
On Tue, 13 Oct 2015 06:59:26 -0700, Richard Cochran wrote: On Mon, Oct 12, 2015 at 11:45:21AM -0700, Christopher S. Hall wrote: +struct ptp_sys_offset_precise { + unsigned int rsv[4];/* Reserved for future use. */ + struct ptp_clock_time dev; +

Re: [PATCH v4 1/4] Produce system time from correlated clocksource

2015-10-14 Thread Christopher Hall
Richard, On Tue, 13 Oct 2015 14:12:24 -0700, Richard Cochran wrote: On Tue, Oct 13, 2015 at 09:15:51PM +0200, Thomas Gleixner wrote: Can we at least have a explanation of how the firmware operates? How are (ART,sys) pairs are generated, and how they are supposed

[PATCH v2 1/4] Add generic correlated clocksource code and ART to TSC conversion code

2015-08-07 Thread Christopher Hall
Original patch description: Subject: ptp: Get sync timestamps From: Thomas Gleixner t...@linutronix.de Date: Wed, 29 Jul 2015 10:52:06 +0200 The ART stuff wants to be splitted out. Changes === Add struct correlated_cs (clocksource) with pointer to original clocksource and

[PATCH v2 2/4] Add ART initialization code

2015-08-07 Thread Christopher Hall
add private struct correlated_ts member used by get_ts() code added EXPORTs making get_correlated_timestamp() function and art_timestamper accessible Add special case for denominator of 2 (art_to_tsc()) --- arch/x86/include/asm/cpufeature.h | 3 ++- arch/x86/include/asm/tsc.h|

[PATCH v2 4/4] Added getsynctime64() callback

2015-08-07 Thread Christopher Hall
Reads ART (TSC correlated clocksource), converts to realtime clock, and reports cross timestamp to PTP driver --- drivers/net/ethernet/intel/e1000e/defines.h | 7 +++ drivers/net/ethernet/intel/e1000e/ptp.c | 88 + drivers/net/ethernet/intel/e1000e/regs.h

[PATCH v2 0/4] Patchset enabling hardware based cross-timestamps for next gen Intel platforms

2015-08-07 Thread Christopher Hall
is unchanged and the e1000e driver patch uses the *new* correlated clocksource interface but is otherwise (in terms of hardware and PTP driver) unchanged. * ART is removed as a compile option * ART is added as an X86_FEATURE Christopher Hall (4): Add generic correlated clocksource code

[PATCH v2 3/4] Add support for driver cross-timestamp to PTP_SYS_OFFSET ioctl

2015-08-07 Thread Christopher Hall
This patch allows system and device time (cross-timestamp) to be performed by the driver. Currently, the 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

[PATCH 3/5] Add calls to translate Always Running Timer (ART) to system time

2015-07-27 Thread Christopher Hall
* art_to_mono64 * art_to_rawmono64 * art_to_realtime64 Intel audio and PCH ethernet devices use the Always Running Timer (ART) to relate their device clock to system time Signed-off-by: Christopher Hall christopher.s.h...@intel.com --- arch/x86/Kconfig | 12 arch/x86/include/asm

[PATCH 4/5] Add support for driver cross-timestamp to PTP_SYS_OFFSET ioctl

2015-07-27 Thread Christopher Hall
Modified PTP_SYS_OFFSET ioctl in PTP clock driver to use the above callback if it's available Added capability (PTP_CLOCK_GETCAPS) for checking whether driver supports cross timestamping Added check for cross timestamping flag to testptp.c Signed-off-by: Christopher Hall christopher.s.h...@intel.com

[PATCH 1/5] Add functions producing system time given a backing counter value

2015-07-27 Thread Christopher Hall
* counter_to_rawmono64 * counter_to_mono64 * counter_to_realtime64 Enables drivers to translate a captured system clock counter to system time. This is useful for network and audio devices that capture timestamps in terms of both the system clock and device clock. Signed-off-by: Christopher Hall

[PATCH 5/5] Enables cross timestamping in the e1000e driver

2015-07-27 Thread Christopher Hall
Adds getsynctime64() callback which captures raw cross timestamp between ART and Ethernet device clock Translates captured ART to REALTIME clock Signed-off-by: Christopher Hall christopher.s.h...@intel.com --- drivers/net/ethernet/intel/e1000e/defines.h | 7 +++ drivers/net/ethernet/intel

[PATCH 0/5] Patchset enabling hardware based cross-timestamps for next gen Intel platforms

2015-07-27 Thread Christopher Hall
can't be completed. This is indicated by the driver returning a non-zero value. Christopher Hall (5): Add functions producing system time given a backing counter value Added functions mapping TSC value to system time Add calls to translate Always Running Timer (ART) to system time Add

[PATCH 2/5] Added functions mapping TSC value to system time

2015-07-27 Thread Christopher Hall
* tsc_to_rawmono64 * tsc_to_realtime64 * tsc_to_mono64 These function build on the counter_to_* time translation function specifically for TSC based system clock Signed-off-by: Christopher Hall christopher.s.h...@intel.com --- arch/x86/include/asm/tsc.h | 5 + arch/x86/kernel/tsc.c

[PATCH v3] Add support for driver cross-timestamp to PTP_SYS_OFFSET ioctl

2015-07-08 Thread Christopher Hall
Modified PTP_SYS_OFFSET ioctl in PTP clock driver to use the above callback if it's available Added capability (PTP_CLOCK_GETCAPS) for checking whether driver supports cross timestamping Added check for cross timestamping flag to testptp.c Signed-off-by: Christopher Hall christopher.s.h...@intel.com

[PATCH v2 0/1] Add PTP cross-timestamp to the PTP driver interface

2015-07-02 Thread Christopher Hall
the getsynctime callback, providing more precise cross timestamping. Christopher Hall (1): Added additional callback to ptp_clock_info: drivers/ptp/ptp_chardev.c| 29 + include/linux/ptp_clock_kernel.h | 8 include/uapi/linux/ptp_clock.h | 4 +++- 3

[PATCH v2 1/1] Added additional callback to ptp_clock_info:

2015-07-02 Thread Christopher Hall
(PTP_CLOCK_GETCAPS) for checking whether driver supports precise timestamping Signed-off-by: Christopher Hall christopher.s.h...@intel.com --- drivers/ptp/ptp_chardev.c| 29 + include/linux/ptp_clock_kernel.h | 8 include/uapi/linux/ptp_clock.h | 4

[PATCH] Added additional callback to ptp_clock_info:

2015-06-25 Thread Christopher Hall
-by: Christopher Hall christopher.s.h...@intel.com --- drivers/ptp/ptp_chardev.c| 30 +- include/linux/ptp_clock_kernel.h | 3 +++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/drivers/ptp/ptp_chardev.c b/drivers/ptp/ptp_chardev.c index da7bae9..e91f98e

[PATCH] Add PTP cross-timestamp to the PTP driver interface

2015-06-25 Thread Christopher Hall
when available. Additionally, the callback, getsynctime64(), will only be called when n_samples == 1 because the driver returns only 1 cross-timestamp where multiple samples cannot be chained together. Christopher Hall (1): Added additional callback to ptp_clock_info: drivers/ptp