From nobody Wed Oct 8 05:39:36 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 961162777FC; Tue, 1 Jul 2025 13:27:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751376423; cv=none; b=T8CY6HQF8O4RQuoG1EDKqTgypWdxgt+NuZN7/ubr+jss/tunzpuPsUe7LeE5djIWBr5rZ/wwhF+fjjrM3utnGV/vsDZQlb+LTBaOiZuRVR5ASJNsHOS5333Ob9wA22Y4V69CFW80GkED2Dt8iTA4Egna7jm0fLbbe/GvqOAe01Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751376423; c=relaxed/simple; bh=5RNhCpR6Q1GmYvcPKgXDCb94dG9rjVKCJEAKUi69+Es=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=BcrQmxkdiCgtQv/TnR6sv0l0pEHlFCLbzCJjnW/VLTwOmNwTHqmT6i+RhJ9NLxNgtJ9+vR44U2hKY1beYmFqe4a8R/BhIRfp3OwOt7jWG29TiW0YM5CwRUzJy+vyGsGDAut22g33bhz8ySwxcjXwlYMJjFLjrydLz4mE7MhVaVQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ODQNWt64; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=xLTz2k2l; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ODQNWt64"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xLTz2k2l" Message-ID: <20250701132628.357686408@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1751376419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=hoiEUCmAftSwBNyHB6MQ2qZehcsPidfdPcIR06aCg/g=; b=ODQNWt64TaeT1qQUWjm/yruEkouA/hrp0m/pUfFzl45HyT+yMlr0EkojW2khfGZcG+M25W g9dR+eYLdALIYk8CqoJ9lGxdBQZ8ilDe47RgHBgGcMIC3z6NDhPc8oaGXam00x5N6vquku WVO7ld/NDdYjtq1gYHzM/yqsZXan5u8ZhOff7m6NUUUYD0cTmeek6IY2eF1L1ys1/N6i2H xZIhkKJkw6LXl827oE94AjpoCCzdXP5S1cFTFACyEg+yzSooK0RKEAAyNYo7KEv+z1Zo4X +c+cIPc59h3pWGWihayN5LcNdbqfuYVnVBeGxYP5N3fg+w3XFovntbiu0S3OuA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1751376419; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=hoiEUCmAftSwBNyHB6MQ2qZehcsPidfdPcIR06aCg/g=; b=xLTz2k2lD6y6T+/uwlo5izxwUMW3eTObL4lrQ1dM+t2BVgzUKjvpd/jBcQpMOC++gkr4MO uSVhQ1D1SSUTSyDA== From: Thomas Gleixner To: LKML Cc: netdev@vger.kernel.org, Richard Cochran , Christopher Hall , John Stultz , Frederic Weisbecker , Anna-Maria Behnsen , Miroslav Lichvar , Werner Abt , David Woodhouse , Stephen Boyd , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Kurt Kanzenbach , Nam Cao , Antoine Tenart , Paolo Abeni , Vadim Fedorenko Subject: [patch V2 1/3] timekeeping: Provide ktime_get_clock_ts64() References: <20250701130923.579834908@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 1 Jul 2025 15:26:58 +0200 (CEST) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" PTP implements an inline switch case for taking timestamps from various POSIX clock IDs, which already consumes quite some text space. Expanding it for auxiliary clocks really becomes too big for inlining. Provide a out of line version.=20 The function invalidates the timestamp in case the clock is invalid. The invalidation allows to implement a validation check without the need to propagate a return value through deep existing call chains. Due to merge logistics this temporarily defines CLOCK_AUX[_LAST] if undefined, so that the plain branch, which does not contain any of the core timekeeper changes, can be pulled into the networking tree as prerequisite for the PTP side changes. These temporary defines are removed after that branch is merged into the tip::timers/ptp branch. That way the result in -next or upstream in the next merge window has zero dependencies. Signed-off-by: Thomas Gleixner Reviewed-by: Vadim Fedorenko Acked-by: John Stultz --- V2: Provide a workaround for networking folks to handle merge logistics. --- include/linux/timekeeping.h | 10 ++++++++++ kernel/time/timekeeping.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -44,6 +44,7 @@ extern void ktime_get_ts64(struct timesp extern void ktime_get_real_ts64(struct timespec64 *tv); extern void ktime_get_coarse_ts64(struct timespec64 *ts); extern void ktime_get_coarse_real_ts64(struct timespec64 *ts); +extern void ktime_get_clock_ts64(clockid_t id, struct timespec64 *ts); =20 /* Multigrain timestamp interfaces */ extern void ktime_get_coarse_real_ts64_mg(struct timespec64 *ts); @@ -345,4 +346,13 @@ void read_persistent_wall_and_boot_offse extern int update_persistent_clock64(struct timespec64 now); #endif =20 +/* Temporary workaround to avoid merge dependencies and cross tree messes = */ +#ifndef CLOCK_AUX +#define CLOCK_AUX MAX_CLOCKS +#define MAX_AUX_CLOCKS 8 +#define CLOCK_AUX_LAST (CLOCK_AUX + MAX_AUX_CLOCKS - 1) + +static inline bool ktime_get_aux_ts64(clockid_t id, struct timespec64 *kt)= { return false; } +#endif + #endif --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1573,6 +1573,39 @@ void ktime_get_raw_ts64(struct timespec6 } EXPORT_SYMBOL(ktime_get_raw_ts64); =20 +/** + * ktime_get_clock_ts64 - Returns time of a clock in a timespec + * @id: POSIX clock ID of the clock to read + * @ts: Pointer to the timespec64 to be set + * + * The timestamp is invalidated (@ts->sec is set to -1) if the + * clock @id is not available. + */ +void ktime_get_clock_ts64(clockid_t id, struct timespec64 *ts) +{ + /* Invalidate time stamp */ + ts->tv_sec =3D -1; + ts->tv_nsec =3D 0; + + switch (id) { + case CLOCK_REALTIME: + ktime_get_real_ts64(ts); + return; + case CLOCK_MONOTONIC: + ktime_get_ts64(ts); + return; + case CLOCK_MONOTONIC_RAW: + ktime_get_raw_ts64(ts); + return; + case CLOCK_AUX ... CLOCK_AUX_LAST: + if (IS_ENABLED(CONFIG_POSIX_AUX_CLOCKS)) + ktime_get_aux_ts64(id, ts); + return; + default: + WARN_ON_ONCE(1); + } +} +EXPORT_SYMBOL_GPL(ktime_get_clock_ts64); =20 /** * timekeeping_valid_for_hres - Check if timekeeping is suitable for hres From nobody Wed Oct 8 05:39:36 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E694E277C81; Tue, 1 Jul 2025 13:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751376424; cv=none; b=fDa8aXTC5yF424eFGCvLk+zGiD/OPOL4JOzxQSVeEX7uvPQTg945E6S54IjIGHK4ULIl/fkWWe1JeO65PFDASrWGWmaqvGZRSDwl0CuZtBliN4DRVm+BlctWjfrnTK+LIdqvlt3RITKxQQ83CGSOTjlbIP6aLIlxCZ1niO6ddf8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751376424; c=relaxed/simple; bh=Ozepf7bbvdcsHM/gkfoXhsMGYOgiN2b9GLaX1QJJIbU=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=WwXKziwL/ok5UOA3VhyuQzKnG3bRpACYlI1BcrlLtzPoDz6VKNWSVD8PNHzez2QDKibFNEV96N2yy6gKz2z8rumr4Y4jAxoDDjatDX2/HKhxPFot4YQ6pQRxlPcE35cpWqW/jBdaNd0MNvTeSP3mwgiie68eNekNQ/W0L/TB8jA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KXYdhH9E; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=P1S3Ax6R; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KXYdhH9E"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="P1S3Ax6R" Message-ID: <20250701132628.426168092@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1751376421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=i+rYpaHQ/A+B/vV8jab08TqrZFqFKvErIYJvB81SlaY=; b=KXYdhH9EHGkB+BA04bYe5mq964v9rlKLUeE77Z5311CmjazorURDaGAHuXWr25yyL/NdWS uAcsj3BJqxAnEjzZn/mBIrQq5ws/4ge7rec9pS7O/e7GDu/cQuzHpyKDDZpPkORQ0N9Hh0 /TmoRMG+HvJcr4Zzj1uyXGXkRfaDqXSt4cLS4d7TqkPmfE/D7cpL9GKXKvPZQPQwv4i1XN zDLZXFjj/QeINpIkcweAO40ll46lAzt8rcN+ydxmBOvculAlZ9yDPjucSuGL+TIS3NsuOh cuevmyXYVIxfbXm02VQGUtl3Nd5jtvlB55Bdij7r9vKf8euagVtL/fjnfI+IvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1751376421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=i+rYpaHQ/A+B/vV8jab08TqrZFqFKvErIYJvB81SlaY=; b=P1S3Ax6RX/6eYUTc/7bjOthkf39IY85/at0Xqj44P0KMurW+Fy4+1LQKUWc4bD2jQbtp16 jeWVCNp9BCzWMHAw== From: Thomas Gleixner To: LKML Cc: netdev@vger.kernel.org, Richard Cochran , Christopher Hall , John Stultz , Frederic Weisbecker , Anna-Maria Behnsen , Miroslav Lichvar , Werner Abt , David Woodhouse , Stephen Boyd , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Kurt Kanzenbach , Nam Cao , Antoine Tenart , Paolo Abeni , Vadim Fedorenko Subject: [patch V2 2/3] ptp: Use ktime_get_clock_ts64() for timestamping References: <20250701130923.579834908@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 1 Jul 2025 15:27:00 +0200 (CEST) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The inlined ptp_read_system_[pre|post]ts() switch cases expand to a copious amount of text in drivers, e.g. ~500 bytes in e1000e. Adding auxiliary clock support to the inlines would increase it further. Replace the inline switch case with a call to ktime_get_clock_ts64(), which reduces the code size in drivers and allows to access auxiliary clocks once they are enabled in the IOCTL parameter filter. No functional change. Signed-off-by: Thomas Gleixner Reviewed-by: Vadim Fedorenko Acked-by: John Stultz --- include/linux/ptp_clock_kernel.h | 34 ++++------------------------------ 1 file changed, 4 insertions(+), 30 deletions(-) --- a/include/linux/ptp_clock_kernel.h +++ b/include/linux/ptp_clock_kernel.h @@ -477,40 +477,14 @@ static inline ktime_t ptp_convert_timest =20 static inline void ptp_read_system_prets(struct ptp_system_timestamp *sts) { - if (sts) { - switch (sts->clockid) { - case CLOCK_REALTIME: - ktime_get_real_ts64(&sts->pre_ts); - break; - case CLOCK_MONOTONIC: - ktime_get_ts64(&sts->pre_ts); - break; - case CLOCK_MONOTONIC_RAW: - ktime_get_raw_ts64(&sts->pre_ts); - break; - default: - break; - } - } + if (sts) + ktime_get_clock_ts64(sts->clockid, &sts->pre_ts); } =20 static inline void ptp_read_system_postts(struct ptp_system_timestamp *sts) { - if (sts) { - switch (sts->clockid) { - case CLOCK_REALTIME: - ktime_get_real_ts64(&sts->post_ts); - break; - case CLOCK_MONOTONIC: - ktime_get_ts64(&sts->post_ts); - break; - case CLOCK_MONOTONIC_RAW: - ktime_get_raw_ts64(&sts->post_ts); - break; - default: - break; - } - } + if (sts) + ktime_get_clock_ts64(sts->clockid, &sts->post_ts); } =20 #endif From nobody Wed Oct 8 05:39:36 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3775E278165; Tue, 1 Jul 2025 13:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751376427; cv=none; b=Pm9vzhUHvJ1HtLycnvH/ktXuD6+B0/9mCtlCe/PwjWWynuAmwBAiRqjAyRa3WLWtDbTzt0bUYNZZl2pPB6FP518t87BmTMm2JIw4y0T2CRdXeW4+gvPD1JSfzzp+B+hQtRqs6Z5MpYUnPSP91doWap2l2pXS1IAN+OoosKoSTEo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751376427; c=relaxed/simple; bh=tSPVatUC6106xSY/DkcKqZt7fOsBSjw2UHlC8GqVM/Q=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=ZU3B2Yb02Zt9oVI4cOcp5qeecUnkCED5p7/GgUH4Xb19b5KpyqPw43xb9WzTmQH/cFGhnYGwC2PJCAN2foUSh/iI0YDhCKRsmbE7vfUUqEOdcRHHlL1HsDDPShbvppZoDZi9t6NXrTGzTnbNidNzUcoj4EgvWljMQmQUIQIEAcY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=pKBoF8ma; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MAK9c+19; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="pKBoF8ma"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MAK9c+19" Message-ID: <20250701132628.491315452@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1751376423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=2FB1ANzWXeMVTJuQeYKJfA0PV4HDi8MoJnwt50Us4sE=; b=pKBoF8maFGlctet8tF2icHGXFy+e17xSa/BgecjbHgWVABXkXprFBbf6/YmHzDiuPkDq6p KXY9eMnZ53LKw0AaNJDoS6RBbmS0xqFncm7z3/f7cMpno3+/eOUQZz3Al/AhbzLSBREbXz E9+efNzSz81Rmr9VatBWqQo/cnq+D5Yse458jRqOMnk8Rx3kmMDKHrQznl5r2ePT7Y0lj/ g2gpEuQaoj3vql5sPt1WVyAb4LuT5mT1oZMhXcpOCE2Jljz+SdBH+ZX/h4jHbeC4d84keb 6gfvyEeShId9J2MKC/DmFXUxXSHj3aYNeP1h+es0b17HzRi1/IqlCu02YWdd7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1751376423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=2FB1ANzWXeMVTJuQeYKJfA0PV4HDi8MoJnwt50Us4sE=; b=MAK9c+19xvaHEvrlY0/sf4WYKkautjgVnrNUkQDkqQnOl4VNGlJ1AB+bdFGkfssIzkaz8O pOoyJB11nLp07BCA== From: Thomas Gleixner To: LKML Cc: netdev@vger.kernel.org, Richard Cochran , Christopher Hall , John Stultz , Frederic Weisbecker , Anna-Maria Behnsen , Miroslav Lichvar , Werner Abt , David Woodhouse , Stephen Boyd , =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , Kurt Kanzenbach , Nam Cao , Antoine Tenart , Paolo Abeni , Vadim Fedorenko Subject: [patch V2 3/3] ptp: Enable auxiliary clocks for PTP_SYS_OFFSET_EXTENDED References: <20250701130923.579834908@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Tue, 1 Jul 2025 15:27:02 +0200 (CEST) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Allow ioctl(PTP_SYS_OFFSET_EXTENDED*) to select CLOCK_AUX clock ids for generating the pre and post hardware readout timestamps. Aside of adding these clocks to the clock ID validation, this also requires to check the timestamp to be valid, i.e. the seconds value being greater than or equal zero. This is necessary because AUX clocks can be asynchronously enabled or disabled, so there is no way to validate the availability upfront. The same could have been achieved by handing the return value of ktime_get_aux_ts64() all the way down to the IOCTL call site, but that'd require to modify all existing ptp::gettimex64() callbacks and their inner call chains. The timestamp check achieves the same with less churn and less complicated code all over the place. Signed-off-by: Thomas Gleixner Reviewed-by: Vadim Fedorenko --- V2: Catch CONFIG_POSIX_AUX_CLOCKS=3Dn right at the clockid check --- drivers/ptp/ptp_chardev.c | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) --- a/drivers/ptp/ptp_chardev.c +++ b/drivers/ptp/ptp_chardev.c @@ -325,13 +325,22 @@ static long ptp_sys_offset_extended(stru if (IS_ERR(extoff)) return PTR_ERR(extoff); =20 - if (extoff->n_samples > PTP_MAX_SAMPLES || - extoff->rsv[0] || extoff->rsv[1] || - (extoff->clockid !=3D CLOCK_REALTIME && - extoff->clockid !=3D CLOCK_MONOTONIC && - extoff->clockid !=3D CLOCK_MONOTONIC_RAW)) + if (extoff->n_samples > PTP_MAX_SAMPLES || extoff->rsv[0] || extoff->rsv[= 1]) return -EINVAL; =20 + switch (extoff->clockid) { + case CLOCK_REALTIME: + case CLOCK_MONOTONIC: + case CLOCK_MONOTONIC_RAW: + break; + case CLOCK_AUX ... CLOCK_AUX_LAST: + if (IS_ENABLED(CONFIG_POSIX_AUX_CLOCKS)) + break; + fallthrough; + default: + return -EINVAL; + } + sts.clockid =3D extoff->clockid; for (unsigned int i =3D 0; i < extoff->n_samples; i++) { struct timespec64 ts; @@ -340,6 +349,11 @@ static long ptp_sys_offset_extended(stru err =3D ptp->info->gettimex64(ptp->info, &ts, &sts); if (err) return err; + + /* Filter out disabled or unavailable clocks */ + if (sts.pre_ts.tv_sec < 0 || sts.post_ts.tv_sec < 0) + return -EINVAL; + extoff->ts[i][0].sec =3D sts.pre_ts.tv_sec; extoff->ts[i][0].nsec =3D sts.pre_ts.tv_nsec; extoff->ts[i][1].sec =3D ts.tv_sec; From nobody Wed Oct 8 05:39:36 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FB6E233127; Thu, 3 Jul 2025 12:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751546983; cv=none; b=C0eLWHA8K+U+xfE8qDGLKDWmB63xcVaHGBogFpiyfWvFu4kr1JSr0GDFH+7iFmSRRiQWYtqFaGfOmEeLFdeo6fqkBh+fxq4BxyOIJy7WlgJ81Cb4mXodLxSWoNnwad0ejnyocmHeyb1M6DEgpJ+c1IJRtIGPv5dLvNpNuPFhI/4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751546983; c=relaxed/simple; bh=B/L4oIFgwl3Hxch2Pmb5tdewjqC/ENSMUQWNB9qtBC4=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=SZSft6dHjHEeUI5r8ByveBG7//sBPoRNF2cSeBeHD/plwHSXa/9PNsOvduj5lu2uxtBN3rPhivS4pTCdBKnIQ8q3N97uc6liF5yRbDaSEukNhkRNH0Z5E015y6aa7BY9Lqws8xvPhcnUy49T5NO/tVHdUhiQ4M2sC4+M5KAK0uk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GqZMHZnw; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=PgToSr9A; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GqZMHZnw"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="PgToSr9A" Date: Thu, 03 Jul 2025 12:49:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1751546980; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pHFAxVWLbQyAvu3oURRPmlTXh7OSPuGh19aHRHRFeqg=; b=GqZMHZnwFx0FHt8CuquORACv4adJjdOi9CvMo9wAB6VuVw88HR0aK7zeIfwSOdj6aMdB+a pbskaO+XXX8WZpKFrWRvpKZuHXN57fJycliy9E8gyaoXsTQsVCdWPpjcLnAHwYyLMymRAZ U1TV8j1FMZY0WYjrBiTkvU9bYi7EcIYk6eSO0cH/OefWF7PTX4oPFTpqqQPOZ9ceS1diJz wDi77Gar8Wbu33D205+mjSgdgtPKkNvqPV6H43oxWmutDPqVTrivnJ1EonvfqH/J9pN/Gr iE+41CS0veLjjNFz/xqFfIaOMwE3fvt0emI8EGQAdFfuEH9TivjV0pYzb3oPfg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1751546980; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pHFAxVWLbQyAvu3oURRPmlTXh7OSPuGh19aHRHRFeqg=; b=PgToSr9ADN1n9AohKXn4V0VRjFH9+Bd33LKkR3+jM7J+Cl7nV5aHa4bkMq9Sw4XIvc4VHP vfBBo72VXid0RVDA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/ptp] timekeeping: Remove the temporary CLOCK_AUX workaround Cc: Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250701130923.579834908@linutronix.de> References: <20250701130923.579834908@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <175154697931.406.10685240214515263929.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the timers/ptp branch of tip: Commit-ID: 8959338617a85e35820e3a7fa21801cf55b068bf Gitweb: https://git.kernel.org/tip/8959338617a85e35820e3a7fa21801cf5= 5b068bf Author: Thomas Gleixner AuthorDate: Thu, 03 Jul 2025 14:39:28 +02:00 Committer: Thomas Gleixner CommitterDate: Thu, 03 Jul 2025 14:44:15 +02:00 timekeeping: Remove the temporary CLOCK_AUX workaround ktime_get_clock_ts64() was provided for the networking tree as a stand alone commit based on v6.16-rc1. It contains a temporary workaround for the CLOCK_AUX* defines, which are only available in the timekeeping tree. As this commit is now merged into the timers/ptp branch, which contains the real CLOCK_AUX* defines, the workaround is obsolete. Remove it. Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/all/20250701130923.579834908@linutronix.de --- include/linux/timekeeping.h | 9 --------- 1 file changed, 9 deletions(-) diff --git a/include/linux/timekeeping.h b/include/linux/timekeeping.h index 6121924..aee2c1a 100644 --- a/include/linux/timekeeping.h +++ b/include/linux/timekeeping.h @@ -357,13 +357,4 @@ void read_persistent_wall_and_boot_offset(struct times= pec64 *wall_clock, extern int update_persistent_clock64(struct timespec64 now); #endif =20 -/* Temporary workaround to avoid merge dependencies and cross tree messes = */ -#ifndef CLOCK_AUX -#define CLOCK_AUX MAX_CLOCKS -#define MAX_AUX_CLOCKS 8 -#define CLOCK_AUX_LAST (CLOCK_AUX + MAX_AUX_CLOCKS - 1) - -static inline bool ktime_get_aux_ts64(clockid_t id, struct timespec64 *kt)= { return false; } -#endif - #endif