diff options
| author | Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> | 2026-11-11 10:54:27 +0100 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-11-16 15:24:03 -0800 |
| commit | 4cad287cb13c1fc32e4afa590e4148fa288d5741 (patch) | |
| tree | c5dcbcc372f2c0218c2662caccd245d85f0b0073 /tools/perf/scripts/python | |
| parent | ce09d8c13a15fe881d0a04c91979dcdf45ed9543 (diff) | |
net: stmmac: re-base EST after PTP settime64
stmmac_set_time() initializes the PTP clock through
stmmac_init_systime() (TSINIT) while holding only ptp_lock. It neither
takes est_lock nor disables and re-bases EST around the step, unlike
stmmac_adjust_time(), which performs TSUPDT through
stmmac_adjust_systime() under est_lock.
Both operations change the PHC system time, so both invalidate the
absolute EST base time. With settime64, a concurrent
tc_taprio_configure() can read the pre-step clock through gettimex64()
and program EST with a base time that is already stale once TSINIT
lands. Separately, a taprio offload installed before the clock_settime()
is never re-based and keeps running with its old base time until taprio
is reconfigured.
Take est_lock for the whole disable/step/reprogram sequence, as
stmmac_adjust_time() does: disable EST before initializing the clock and
call __stmmac_setup_est() afterwards so the base time is recomputed from
the reserved taprio base time and the new clock.
This keeps the established est_lock -> ptp_lock ordering:
stmmac_init_systime() only uses readl_poll_timeout_atomic() under
ptp_lock, and __stmmac_setup_est() takes ptp_lock through gettimex64().
Fixes: b60189e0392f ("net: stmmac: Integrate EST with TAPRIO scheduler API")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20261111-stmmac_set_time-est_lock-v1-1-da1554f233e6@oss.qualcomm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
