mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
ice/ptp: Use provided clock ID for history snapshot
The PTP core indicates in system_device_crosststamp::clock_id the clock ID for which then system time stamp should be taken. That allows to utilize hardware timestamps with e.g. AUX clocks. Save the provided clock ID and use it in ice_capture_crosststamp() for taking the history snapshot. No functional change. Signed-off-by: Thomas Gleixner <tglx@kernel.org> Tested-by: Arthur Kiyanovski <akiyano@amazon.com> Reviewed-by: David Woodhouse <dwmw@amazon.co.uk> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://patch.msgid.link/20260529195557.587226681@kernel.org
This commit is contained in:
parent
570cf418bf
commit
23bc637750
|
|
@ -2065,11 +2065,13 @@ static const struct ice_crosststamp_cfg ice_crosststamp_cfg_e830 = {
|
|||
/**
|
||||
* struct ice_crosststamp_ctx - Device cross timestamp context
|
||||
* @snapshot: snapshot of system clocks for historic interpolation
|
||||
* @snapshot_clock_id: System clock ID for @snapshot
|
||||
* @pf: pointer to the PF private structure
|
||||
* @cfg: pointer to hardware configuration for cross timestamp
|
||||
*/
|
||||
struct ice_crosststamp_ctx {
|
||||
struct system_time_snapshot snapshot;
|
||||
clockid_t snapshot_clock_id;
|
||||
struct ice_pf *pf;
|
||||
const struct ice_crosststamp_cfg *cfg;
|
||||
};
|
||||
|
|
@ -2115,7 +2117,7 @@ static int ice_capture_crosststamp(ktime_t *device,
|
|||
}
|
||||
|
||||
/* Snapshot system time for historic interpolation */
|
||||
ktime_get_snapshot(&ctx->snapshot);
|
||||
ktime_get_snapshot_id(ctx->snapshot_clock_id, &ctx->snapshot);
|
||||
|
||||
/* Program cmd to master timer */
|
||||
ice_ptp_src_cmd(hw, ICE_PTP_READ_TIME);
|
||||
|
|
@ -2176,6 +2178,7 @@ static int ice_ptp_getcrosststamp(struct ptp_clock_info *info,
|
|||
{
|
||||
struct ice_pf *pf = ptp_info_to_pf(info);
|
||||
struct ice_crosststamp_ctx ctx = {
|
||||
.snapshot_clock_id = cts->clock_id,
|
||||
.pf = pf,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user