linux/drivers/ptp
Carolina Jubran 5a89b27afd ptp: Allow exposing cycles only for clocks with free-running counter
The PTP core falls back to gettimex64 and getcrosststamp when
getcycles64 or getcyclesx64 are not implemented. This causes the CYCLES
ioctls to retrieve PHC real time instead of free-running cycles.

Reject PTP_SYS_OFFSET_{PRECISE,EXTENDED}_CYCLES for clocks without
free-running counter support since the result would represent PHC real
time and system time rather than cycles and system time.

Fixes: faf23f54d3 ("ptp: Add ioctl commands to expose raw cycle counter values")
Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
Link: https://patch.msgid.link/20251029083813.2276997-1-cjubran@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-10-31 16:27:40 -07:00
..
Kconfig ptp: qoriq: convert to use generic interfaces to set loopback mode 2025-09-09 19:28:52 -07:00
Makefile ptp: qoriq: convert to use generic interfaces to set loopback mode 2025-09-09 19:28:52 -07:00
ptp_chardev.c ptp: Allow exposing cycles only for clocks with free-running counter 2025-10-31 16:27:40 -07:00
ptp_clock.c ptp: rework ptp_clock_unregister() to disable events 2025-09-17 15:04:09 -07:00
ptp_clockmatrix.c ptp: ptp_clockmatrix: Remove redundant semicolons 2025-08-14 17:35:49 -07:00
ptp_clockmatrix.h
ptp_dfl_tod.c
ptp_dte.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ptp_fc3.c net: ptp: introduce .supported_extts_flags to ptp_clock_info 2025-04-15 20:20:57 -07:00
ptp_fc3.h ptp: add FemtoClock3 Wireless as ptp hardware clock 2024-01-29 13:00:23 +00:00
ptp_idt82p33.c net: ptp: introduce .supported_extts_flags to ptp_clock_info 2025-04-15 20:20:57 -07:00
ptp_idt82p33.h
ptp_ines.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ptp_kvm_arm.c treewide: Remove system_counterval_t.cs, which is never read 2024-02-07 17:05:21 +01:00
ptp_kvm_common.c treewide: Remove system_counterval_t.cs, which is never read 2024-02-07 17:05:21 +01:00
ptp_kvm_x86.c ptp: kvm: x86: Return EOPNOTSUPP instead of ENODEV from kvm_arch_ptp_init() 2024-12-06 17:38:11 -08:00
ptp_mock.c time/timecounter: Fix the lie that struct cyclecounter is const 2025-07-01 15:38:25 +02:00
ptp_netc.c ptp: netc: only enable periodic pulse event interrupts for PPS 2025-09-17 15:18:58 -07:00
ptp_ocp.c ptp: ocp: Fix typo using index 1 instead of i in SMA initialization loop 2025-10-22 19:18:39 -07:00
ptp_pch.c ptp_pch: Replace deprecated PCI functions 2024-10-31 18:53:35 -07:00
ptp_private.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-10-01 10:14:49 +02:00
ptp_qoriq.c ptp: qoriq: convert to use generic interfaces to set loopback mode 2025-09-09 19:28:52 -07:00
ptp_s390.c s390/time: Add PtP driver 2024-10-30 17:02:39 -07:00
ptp_sysfs.c ptp: Add a upper bound on max_vclocks 2025-09-26 15:30:31 -07:00
ptp_vclock.c ptp: prevent possible ABBA deadlock in ptp_clock_freerun() 2025-08-12 14:17:35 -07:00
ptp_vmclock.c ptp: vmclock: Remove goto-based cleanup logic 2025-02-11 10:20:52 +01:00
ptp_vmw.c ptp/vmware: Use VMware hypercall API 2024-06-25 17:15:47 +02:00