From: Thomas Gleixner <tglx@linutronix.de>
To: "Markus Blöchl" <markus@blochl.de>,
"Tony Nguyen" <anthony.l.nguyen@intel.com>,
"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
"Richard Cochran" <richardcochran@gmail.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
markus.bloechl@ipetronik.com, John Stultz <jstultz@google.com>,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] e1000e: Populate entire system_counterval_t in get_time_fn() callback
Date: Sat, 19 Jul 2025 22:00:42 +0200 [thread overview]
Message-ID: <87ldokuf11.ffs@tglx> (raw)
In-Reply-To: <20250709-e1000e_crossts-v1-1-f8a80c792e4f@blochl.de>
On Wed, Jul 09 2025 at 16:34, Markus Blöchl wrote:
> get_time_fn() callback implementations are expected to fill out the
> entire system_counterval_t struct as it may be initially uninitialized.
>
> This broke with the removal of convert_art_to_tsc() helper functions
> which left use_nsecs uninitialized.
>
> Assign the entire struct again.
>
> Fixes: bd48b50be50a ("e1000e: Replace convert_art_to_tsc()")
> Cc: stable@vger.kernel.org
> ---
> Notes:
>
> Related-To: <https://lore.kernel.org/lkml/txyrr26hxe3xpq3ebqb5ewkgvhvp7xalotaouwludjtjifnah2@7tmgczln4aoo/>
> ---
> drivers/net/ethernet/intel/e1000e/ptp.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000e/ptp.c b/drivers/net/ethernet/intel/e1000e/ptp.c
> index ea3c3eb2ef2020d513d49c1368679f27d17edb04..f01506504ee3a11822930115e9ed07661d81532c 100644
> --- a/drivers/net/ethernet/intel/e1000e/ptp.c
> +++ b/drivers/net/ethernet/intel/e1000e/ptp.c
> @@ -124,8 +124,11 @@ static int e1000e_phc_get_syncdevicetime(ktime_t *device,
> sys_cycles = er32(PLTSTMPH);
> sys_cycles <<= 32;
> sys_cycles |= er32(PLTSTMPL);
> - system->cycles = sys_cycles;
> - system->cs_id = CSID_X86_ART;
> + *system = (struct system_counterval_t) {
> + .cycles = sys_cycles,
> + .cs_id = CSID_X86_ART,
> + .use_nsecs = false,
This is again the wrong place to fix this.
> + };
>
> return 0;
> }
>
> ---
> base-commit: 733923397fd95405a48f165c9b1fbc8c4b0a4681
> change-id: 20250709-e1000e_crossts-7745674f682a
>
> Best regards,
prev parent reply other threads:[~2025-07-19 20:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 14:34 [PATCH] e1000e: Populate entire system_counterval_t in get_time_fn() callback Markus Blöchl
2025-07-10 2:10 ` John Stultz
2025-07-19 20:00 ` Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ldokuf11.ffs@tglx \
--to=tglx@linutronix.de \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jstultz@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.bloechl@ipetronik.com \
--cc=markus@blochl.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox