You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge: CNB96: timekeeping: add clocksource ID and infrastructure for converting to/from a base clock
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5380
JIRA: https://issues.redhat.com/browse/RHEL-61639
First, the cross-timestamp mechanism which allows to correlate hardware clocks uses clocksource pointers for describing the correlation.
That's suboptimal as drivers need to obtain the pointer, which requires needless exports and exposing internals. This can be avoided by adding clocksource IDs to all clocksources in the tree which can be exposed to this mechanism.
Second, hardware time stamps like provided by PTP clock implementations are based on a clock which feeds both the PCIe device and the system clock. For further processing the underlying hardware clock timestamp must be converted to the system clock. Right now this requires drivers to invoke an architecture specific conversion function, e.g. to convert the ART (Always Running Timer) timestamp to a TSC timestamp.
This can be avoided by moving this functionality to the core code by providing a base clock property for the system clock which contains the conversion factors and assigning a clocksource ID to the base clock.
Commits:
```
5f10376 ("add missing includes and forward declarations to networking includes under linux/")
c55cbfc ("x86/tsc: Correct kernel-doc notation")
93630d6 ("timekeeping: Add clocksource ID to struct system_counterval_t")
a2c1fe7 ("x86/tsc: Add clocksource ID, set system_counterval_t.cs_id")
576bd49 ("x86/kvm, ptp/kvm: Add clocksource ID, set system_counterval_t.cs_id")
9be3b2f ("ptp/kvm, arm_arch_timer: Set system_counterval_t.cs_id to constant")
4b7f521 ("timekeeping: Evaluate system_counterval_t.cs_id instead of .cs")
b152688 ("treewide: Remove system_counterval_t.cs, which is never read")
27f6a9c ("kvmclock: Unexport kvmclock clocksource")
6b2e299 ("timekeeping: Provide infrastructure for converting to/from a base clock")
3a52886 ("x86/tsc: Provide ART base clock information for TSC")
bd48b50 ("e1000e: Replace convert_art_to_tsc()")
fcb0591 ("igc: Remove convert_art_ns_to_tsc()")
f5e1d0d ("stmmac: intel: Remove convert_art_to_tsc()")
b3266ed ("ALSA: hda: Remove convert_art_to_tsc()")
d4bea54 ("ice/ptp: Remove convert_art_to_tsc()")
0f532a7 ("x86/tsc: Remove obsolete ART to TSC conversion functions")
02ecee0 ("timekeeping: Add function to convert realtime to base clock")
```
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Approved-by: Phil Auld <pauld@redhat.com>
Approved-by: Tony Camuso <tcamuso@redhat.com>
Approved-by: Corinna Vinschen <vinschen@redhat.com>
Approved-by: Chris von Recklinghausen <crecklin@redhat.com>
Approved-by: Mark Salter <msalter@redhat.com>
Approved-by: Davide Caratti <dcaratti@redhat.com>
Approved-by: Prarit Bhargava <prarit@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
0 commit comments