f an interface to adjust k.
See 17.14.4 of the Intel SDM for more details]
Reviewed-by: Thomas Gleixner
Signed-off-by: Christopher S. Hall
[jstultz: Tweaked to fix build issue, also reworked math for
64bit division on 32bit systems]
Signed-off-by: John Stultz
---
arch/x86/include/asm
ted clocksource
mechanism.
On systems that support ART a new CPUID leaf (0x15) returns parameters
“m” and “n” such that:
TSC_value = (ART_value * m) / n + k [n >= 1]
[k is an offset that can adjusted by a privileged agent. The
IA32_TSC_ADJUST MSR is an example of an interface to adjust k.
See 17.1
hich is
exactly related to TSC through a known frequency ratio. The ART is
routed to devices on the system and is used to precisely and
simultaneously capture the device clock with the ART.
Signed-off-by: Christopher S. Hall
[jstultz: Reworked to remove extra structures and simplify calling]
Signed-off-
using ktime_get_snapshot() and
must be called before the counter values are read.
Signed-off-by: Christopher S. Hall
Signed-off-by: John Stultz
---
include/linux/timekeeper_internal.h | 2 +
include/linux/timekeeping.h | 5 ++
kernel/time/timekeeping.c | 173 +++
of an interface to adjust k.
See 17.14.4 of the Intel SDM for more details]
Signed-off-by: Christopher S. Hall
[jstultz: Tweaked to fix build issue, also reworked math for
64bit division on 32bit systems]
Signed-off-by: John Stultz
---
arch/x86/include/asm/cpufeature.h | 2 +-
arch/x86/include/
get_system_device_crosststamp(). The hardware cross-timestamp result
is made available to applications through the PTP_SYS_OFFSET_PRECISE
ioctl which calls e1000e_phc_getcrosststamp().
Signed-off-by: Christopher S. Hall
[jstultz: Reworked to use new interface, commit message tweaks]
Signed-off-by: John Stultz
timestamping.
Acked-by: Richard Cochran
Signed-off-by: Christopher S. Hall
[jstultz: Commit subject tweaks]
Signed-off-by: John Stultz
---
Documentation/ptp/testptp.c | 6 --
drivers/ptp/ptp_chardev.c| 27 +++
include/linux/ptp_clock_kernel.h | 8
In the current timekeeping code there isn't any interface to
atomically capture the current relationship between the system counter
and system time. ktime_get_snapshot() returns this triple (counter,
monotonic raw, realtime) in the system_time_snapshot struct.
Signed-off-by: Christopher S.
nanosecond value from a cycle count that can be added to
tk_read_base.base value yielding the current system time. This allows
clocksource cycle values external to the timekeeping code to provide a
cycle count that can be transformed to system time.
Signed-off-by: Christopher S. Hall
Signed-off-by: John
an array where the history is stored.
Christopher S. Hall (8):
time: Add cycles to nanoseconds translation
time: Add timekeeping snapshot code capturing system time and counter
time: Remove duplicated code in ktime_get_raw_and_real()
time: Add driver cross timestamp interface for higher
(). A side effect of this is that
the raw and real results of pps_get_ts() correspond to exactly the
same clock cycle. Previously these values represented separate reads
of the system clock.
Signed-off-by: Christopher S. Hall
Signed-off-by: John Stultz
---
include/linux/pps_kernel.h | 17
are too slow to be accomodated by the original correlated time
mechanism. The history mechanism turns shadow timekeeper into
an array where the history is stored.
Christopher S. Hall (8):
time: Add cycles to nanoseconds translation
time: Add timekeeping snapshot code capt
In the current timekeeping code there isn't any interface to
atomically capture the current relationship between the system counter
and system time. ktime_get_snapshot() returns this triple (counter,
monotonic raw, realtime) in the system_time_snapshot struct.
Signed-off-by: Christopher S.
hich is
exactly related to TSC through a known frequency ratio. The ART is
routed to devices on the system and is used to precisely and
simultaneously capture the device clock with the ART.
Signed-off-by: Christopher S. Hall
[jstultz: Reworked to remove extra structures and simplify calling]
Signed-off-
of an interface to adjust k.
See 17.14.4 of the Intel SDM for more details]
Signed-off-by: Christopher S. Hall
[jstultz: Tweaked to fix build issue, also reworked math for
64bit division on 32bit systems]
Signed-off-by: John Stultz
---
arch/x86/include/asm/cpufeature.h | 3 ++-
arch/x86/include/
using ktime_get_snapshot() and
must be called before the counter values are read.
Signed-off-by: Christopher S. Hall
Signed-off-by: John Stultz
---
include/linux/timekeeper_internal.h | 2 +
include/linux/timekeeping.h | 5 ++
kernel/time/timekeeping.c | 172 +++
timestamping.
Acked-by: Richard Cochran
Signed-off-by: Christopher S. Hall
[jstultz: Commit subject tweaks]
Signed-off-by: John Stultz
---
Documentation/ptp/testptp.c | 6 --
drivers/ptp/ptp_chardev.c| 27 +++
include/linux/ptp_clock_kernel.h | 8
get_system_device_crosststamp(). The hardware cross-timestamp result
is made available to applications through the PTP_SYS_OFFSET_PRECISE
ioctl which calls e1000e_phc_getcrosststamp().
Signed-off-by: Christopher S. Hall
[jstultz: Reworked to use new interface, commit message tweaks]
Signed-off-by: John Stultz
nanosecond value from a cycle count that can be added to
tk_read_base.base value yielding the current system time. This allows
clocksource cycle values external to the timekeeping code to provide a
cycle count that can be transformed to system time.
Signed-off-by: Christopher S. Hall
Signed-off-by: John
(). A side effect of this is that
the raw and real results of pps_get_ts() correspond to exactly the
same clock cycle. Previously these values represented separate reads
of the system clock.
Signed-off-by: Christopher S. Hall
Signed-off-by: John Stultz
---
include/linux/pps_kernel.h | 17
counter twice.
Signed-off-by: Christopher S. Hall
---
kernel/time/timekeeping.c | 20
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index 5a7f784..a0f096c 100644
--- a/kernel/time/timekeeping.c
+++ b
timestamping.
Signed-off-by: Christopher S. Hall
---
Documentation/ptp/testptp.c | 6 --
drivers/ptp/ptp_chardev.c| 31 +++
include/linux/ptp_clock_kernel.h | 8
include/uapi/linux/ptp_clock.h | 13 -
4 files changed, 55 insertions
hanges) to the time, the error
can be very large.
Signed-off-by: Christopher S. Hall
---
include/linux/clocksource.h | 16
include/linux/timekeeper_internal.h | 4 +
include/linux/timekeeping.h | 9 +-
kernel/time/timekeeping.c | 162 +
of an interface to adjust k.
See 17.14.4 of the Intel SDM for more details]
Signed-off-by: Christopher S. Hall
---
arch/x86/include/asm/cpufeature.h | 2 +-
arch/x86/include/asm/tsc.h| 2 ++
arch/x86/kernel/tsc.c | 46 +++
3 files changed,
get_device_system_crosststamp(). The hardware cross-timestamp result
is made available to applications through the PTP_SYS_OFFSET_PRECISE
ioctl which call e1000e_phc_getsynctime().
Signed-off-by: Christopher S. Hall
---
drivers/net/ethernet/intel/Kconfig | 9 +++
drivers/net/ethernet/intel/e1000e/defines.h
s. In this
case the response time for timestamp reads to the Intel DSP
are too slow to be accomodated by the original correlated time
mechanism. The history mechanism turns shadow timekeeper into
an array where the history is stored.
Christopher S. Hall (6):
Timeke
e current clock
source to calculate the system time. The correlated clocksource adds a
means to transform a clock (in this case ART) exactly to the system
clock (TSC clocksource) that is used to calculate system time.
Signed-off-by: Christopher S. Hall
---
include/linux/clocksource.h | 27 ++
amp value is too old, an error is returned
Signed-off-by: Christopher S. Hall
---
include/linux/clocksource.h | 33 +++
include/linux/timekeeping.h | 4 +
kernel/time/timekeeping.c | 203 ++--
3 files changed, 235 insertions(+), 5 deletions(-)
di
an example of an interface to adjust k.
See 17.14.4 of the Intel SDM for more details]
Signed-off-by: Christopher S. Hall
---
arch/x86/include/asm/cpufeature.h | 2 +-
arch/x86/include/asm/tsc.h| 2 ++
arch/x86/kernel/tsc.c | 48 ++-
3 fi
timestamping.
Signed-off-by: Christopher S. Hall
---
Documentation/ptp/testptp.c | 6 --
drivers/ptp/ptp_chardev.c| 26 ++
include/linux/ptp_clock_kernel.h | 6 ++
include/uapi/linux/ptp_clock.h | 12 +++-
4 files changed, 47 insertions(+), 3
hardware cross-timestamp result is made available to applications
through the PTP_SYS_OFFSET_PRECISE ioctl.
Signed-off-by: Christopher S. Hall
---
drivers/net/ethernet/intel/e1000e/defines.h | 5 ++
drivers/net/ethernet/intel/e1000e/ptp.c | 77 +
drivers/net/ethernet
"slow" device) to perform
cross-timestamping.
Christopher S. Hall (4):
Produce system time from correlated clocksource
Always running timer correlated clocksource
Add PTP_SYS_OFFSET_PRECISE for driver crosstimestamping
Adds hardware supported cross timestamp
Documentation/ptp
to ensure precise correlation
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: Chri
ime reporting cross timestamp to
PTP driver
Signed-off-by: Christopher S. Hall
---
drivers/net/ethernet/intel/e1000e/defines.h | 5 ++
drivers/net/ethernet/intel/e1000e/ptp.c | 88 +
drivers/net/ethernet/intel/e1000e/regs.h| 4 ++
3 files changed,
-off-by: Christopher S. Hall
---
include/linux/clocksource.h | 33 +++
include/linux/timekeeping.h | 4 +++
kernel/time/timekeeping.c | 65 +
3 files changed, 102 insertions(+)
diff --git a/include/linux/clocksource.h b/include
ver conversion of ART to TSC
Signed-off-by: Christopher S. Hall
---
arch/x86/include/asm/cpufeature.h | 3 ++-
arch/x86/include/asm/tsc.h| 2 ++
arch/x86/kernel/tsc.c | 54 +++
3 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/arch/
upport for driver cross-timestamp to PTP_SYS_OFFSET ioctl
Enabling hardware supported PTP system/device crosstimestamping
Christopher S. Hall (2):
Add correlated clocksource deriving system time from an auxiliary
clocksource
Added ART correlated clocksource and ART CPU feature
Documen
37 matches
Mail list logo