From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 12FC3C83F34 for ; Sat, 19 Jul 2025 20:00:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C4E87847FA; Sat, 19 Jul 2025 20:00:47 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id g15znMylc4OG; Sat, 19 Jul 2025 20:00:47 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 23C58847DA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1752955247; bh=65wYKNNiN0OWhVJHpyXS9dHS9Q9ryxSmjNGIVHYwGAE=; h=From:To:Cc:In-Reply-To:References:Date:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cV47HFEggz+khqHnOMQknHLFEYUsIzF9VxS0RWbSOLYN/TuMccKqYo4EXxR8vrU88 tIp0HhQkbxyflT+VAkZ14K4WUJgEOFY9J+pjywxS34S1A7WuVdR1NijVm2SSML+Z7V zcju1qY+GZglfY2ZfW5Hd1DDL5KfqKc0+RNh9VCrMGvwX5w2S4PE8bYKf0141B46Vh +lqarLFz+jwCdwbs3M5ok9o13z1+Cc5uJ5uGRszfoYQ7YCkqzRNgKoqWfYSZGINPi7 FJUfbNsn2seWOdtBcFwZKr5Vq/CnVT0DetFlE8yeqdWUW68YCeNFHcZxaJXDgBr3bI 3ISj1MEzYkP3w== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 23C58847DA; Sat, 19 Jul 2025 20:00:47 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists1.osuosl.org (Postfix) with ESMTP id ACF00DA for ; Sat, 19 Jul 2025 20:00:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 92DD5847DA for ; Sat, 19 Jul 2025 20:00:46 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id JCK_K3OyF1u3 for ; Sat, 19 Jul 2025 20:00:46 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a0a:51c0:0:12e:550::1; helo=galois.linutronix.de; envelope-from=tglx@linutronix.de; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org B99A484036 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org B99A484036 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by smtp1.osuosl.org (Postfix) with ESMTPS id B99A484036 for ; Sat, 19 Jul 2025 20:00:45 +0000 (UTC) From: Thomas Gleixner To: Markus =?utf-8?Q?Bl=C3=B6chl?= , Tony Nguyen , Przemek Kitszel , Richard Cochran Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , markus.bloechl@ipetronik.com, John Stultz , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250709-e1000e_crossts-v1-1-f8a80c792e4f@blochl.de> References: <20250709-e1000e_crossts-v1-1-f8a80c792e4f@blochl.de> Date: Sat, 19 Jul 2025 22:00:42 +0200 Message-ID: <87ldokuf11.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1752955243; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=65wYKNNiN0OWhVJHpyXS9dHS9Q9ryxSmjNGIVHYwGAE=; b=2TcXCo4kTAYDprE+PALaELz8GYMYcdWTfms5ddUBjZyRax99Gv3HNw4OEkvZe47ezBzBVV IZx6/60JHyeJ6cDI67E8aK9rXzCTcQUQ36605TvN23klGNqJ0EvjB5fGWcLjlkv7zn7KTm bwjc8JP41IcktvgB8KqLEwOKYsPrpNXenM8LK91zPyOIbfRn12rKRtGq85Frx3h/ExJhsZ GhB2Cq+aLq89R/Qw3RYpF7QWNY4JgNmLwtrmB63tC8CKqs7We47OCpvNIIK0wNX7cpXTHP BnqcJbLXlh4KlI6rCpXYZ8/HVzn4Aybk3KU/QE3HKQOXG7qJq3tS7XgAVnIxNA== X-Mailman-Original-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1752955243; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=65wYKNNiN0OWhVJHpyXS9dHS9Q9ryxSmjNGIVHYwGAE=; b=499HiW9ZxcprVMIWlEO6AZRhZ5gXR1gUuVmPG+11dRqb4fw1C2HOknupPgqkTWc8c4GSQa 9oXsN0T5bzoqPKBA== X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=linutronix.de X-Mailman-Original-Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=linutronix.de header.i=@linutronix.de header.a=rsa-sha256 header.s=2020 header.b=2TcXCo4k; dkim=pass header.d=linutronix.de header.i=@linutronix.de header.a=ed25519-sha256 header.s=2020e header.b=499HiW9Z Subject: Re: [Intel-wired-lan] [PATCH] e1000e: Populate entire system_counterval_t in get_time_fn() callback X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Wed, Jul 09 2025 at 16:34, Markus Bl=C3=B6chl 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: > --- > 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/ethern= et/intel/e1000e/ptp.c > index ea3c3eb2ef2020d513d49c1368679f27d17edb04..f01506504ee3a11822930115e= 9ed07661d81532c 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 *de= vice, > sys_cycles =3D er32(PLTSTMPH); > sys_cycles <<=3D 32; > sys_cycles |=3D er32(PLTSTMPL); > - system->cycles =3D sys_cycles; > - system->cs_id =3D CSID_X86_ART; > + *system =3D (struct system_counterval_t) { > + .cycles =3D sys_cycles, > + .cs_id =3D CSID_X86_ART, > + .use_nsecs =3D false, This is again the wrong place to fix this. > + }; >=20=20 > return 0; > } > > --- > base-commit: 733923397fd95405a48f165c9b1fbc8c4b0a4681 > change-id: 20250709-e1000e_crossts-7745674f682a > > Best regards, From mboxrd@z Thu Jan 1 00:00:00 1970 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 EB2711DB125; Sat, 19 Jul 2025 20:00:44 +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=1752955248; cv=none; b=BzNok5pMleRoDgsFIZFP+xxEhrECGlCAE/BYwIKenGux8V23/KrOmr8pHtDTz2we3COGTjgubIdLeeGdGTat0Nenxi/Q8cbKFZhdy1dS/KJzPG3ZmXBiXbgZGUQG5qLLW8L7INyrAnTj4h9W7yP0ok/NPBe7PXJZOS7myXNTBSE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752955248; c=relaxed/simple; bh=jTMC6D7kThqRw5KdyTgZQgsbKpneZXJ43ueH6X2ZHuI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=MCFPh/vXUXWT2HKSK2tVfGyMx6katHWwGTxlsRjt2tSruIK0ZaRJ+oxrCJOwKYn/CqK+FReU0oTGnXAd3HRkWC4hIAukN2qYSjDkxlOIhNo7QRdop5uVjhkjBTKf/gtEza+2v4TzweUosoSkIhiMY4ie0jT/Bt4VYOdEHRaTRtQ= 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=2TcXCo4k; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=499HiW9Z; 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="2TcXCo4k"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="499HiW9Z" From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1752955243; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=65wYKNNiN0OWhVJHpyXS9dHS9Q9ryxSmjNGIVHYwGAE=; b=2TcXCo4kTAYDprE+PALaELz8GYMYcdWTfms5ddUBjZyRax99Gv3HNw4OEkvZe47ezBzBVV IZx6/60JHyeJ6cDI67E8aK9rXzCTcQUQ36605TvN23klGNqJ0EvjB5fGWcLjlkv7zn7KTm bwjc8JP41IcktvgB8KqLEwOKYsPrpNXenM8LK91zPyOIbfRn12rKRtGq85Frx3h/ExJhsZ GhB2Cq+aLq89R/Qw3RYpF7QWNY4JgNmLwtrmB63tC8CKqs7We47OCpvNIIK0wNX7cpXTHP BnqcJbLXlh4KlI6rCpXYZ8/HVzn4Aybk3KU/QE3HKQOXG7qJq3tS7XgAVnIxNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1752955243; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=65wYKNNiN0OWhVJHpyXS9dHS9Q9ryxSmjNGIVHYwGAE=; b=499HiW9ZxcprVMIWlEO6AZRhZ5gXR1gUuVmPG+11dRqb4fw1C2HOknupPgqkTWc8c4GSQa 9oXsN0T5bzoqPKBA== To: Markus =?utf-8?Q?Bl=C3=B6chl?= , Tony Nguyen , Przemek Kitszel , Richard Cochran Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , markus.bloechl@ipetronik.com, John Stultz , 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 In-Reply-To: <20250709-e1000e_crossts-v1-1-f8a80c792e4f@blochl.de> References: <20250709-e1000e_crossts-v1-1-f8a80c792e4f@blochl.de> Date: Sat, 19 Jul 2025 22:00:42 +0200 Message-ID: <87ldokuf11.ffs@tglx> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Jul 09 2025 at 16:34, Markus Bl=C3=B6chl 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: > --- > 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/ethern= et/intel/e1000e/ptp.c > index ea3c3eb2ef2020d513d49c1368679f27d17edb04..f01506504ee3a11822930115e= 9ed07661d81532c 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 *de= vice, > sys_cycles =3D er32(PLTSTMPH); > sys_cycles <<=3D 32; > sys_cycles |=3D er32(PLTSTMPL); > - system->cycles =3D sys_cycles; > - system->cs_id =3D CSID_X86_ART; > + *system =3D (struct system_counterval_t) { > + .cycles =3D sys_cycles, > + .cs_id =3D CSID_X86_ART, > + .use_nsecs =3D false, This is again the wrong place to fix this. > + }; >=20=20 > return 0; > } > > --- > base-commit: 733923397fd95405a48f165c9b1fbc8c4b0a4681 > change-id: 20250709-e1000e_crossts-7745674f682a > > Best regards,