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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8B3CEB64DA for ; Fri, 16 Jun 2023 13:48:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344966AbjFPNsp (ORCPT ); Fri, 16 Jun 2023 09:48:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244629AbjFPNsd (ORCPT ); Fri, 16 Jun 2023 09:48:33 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F4763593; Fri, 16 Jun 2023 06:48:27 -0700 (PDT) X-GND-Sasl: alexis.lothore@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686923305; 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=8oK/JD/VfQBaYnT9KJx8BUomsRwXIR/Wq47zzH/xURI=; b=N95uKDkFRvrLUoacdiLx3mrcBstb+8fwzdVsf2ul7uf6Ax64ehU/HuBfHioTUQcfai6VdU QwWC6u36IDmXlt5k2bwHon2DQo6M+6hGsv5SI0s4cnNnhHxYWbqtb5uQDl8vlNcZl7M5Ys yJGDB8+0+hmhrF+Im+MswNcoH7a7Od/7ytGcjOSSFddRP6HI/C8zFDDXUjQZ6iAzRtLk4k CddbTmcvec/b2kFDxlFnPJmRiwjw8z27pXSbRLm/erjIHp5vdUW2uuKBJXVeZKt94/gqYj 9ytK2pvllhb7xJ3erhfBiNnX0Ui+FN5TQaCxqRLEC/4YNaaRhwbK6qk1BrREog== X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id E9A18FF806; Fri, 16 Jun 2023 13:48:21 +0000 (UTC) Message-ID: <71492ab7-9d6b-e41c-e392-1bee04860f18@bootlin.com> Date: Fri, 16 Jun 2023 15:48:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH net-next 3/8] net: stmmac: move PTP interrupt handling to IP-specific DWMAC file To: Simon Horman Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Richard Cochran , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Thomas Petazzoni , Nicolas Carrier References: <20230616100409.164583-1-alexis.lothore@bootlin.com> <20230616100409.164583-4-alexis.lothore@bootlin.com> Content-Language: en-US From: =?UTF-8?Q?Alexis_Lothor=c3=a9?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Simon, On 6/16/23 15:34, Simon Horman wrote: > On Fri, Jun 16, 2023 at 12:04:04PM +0200, alexis.lothore@bootlin.com wrote: >> From: Alexis Lothoré >> >> As for auxiliary snapshot triggers configuration, reading snapshots depends >> on specific registers addresses and layout. As a consequence, move >> PTP-specific part of stmmac interrupt handling to specific DWMAC IP file >> >> Signed-off-by: Alexis Lothoré > > Hi Alexis, > > thanks for your patch. > > ... > >> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c >> index 01c0822d37e6..b36fbb0fa5da 100644 >> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c >> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c > > ... > >> +static void dwmac4_ptp_isr(struct stmmac_priv *priv) >> +{ >> + u32 num_snapshot, ts_status; >> + struct ptp_clock_event event; >> + unsigned long flags; >> + u64 ptp_time; >> + int i; > > Please use reverse xmas tree - longest line to shortest - for new > Networking code. > > struct ptp_clock_event event; > u32 num_snapshot, ts_status; > unsigned long flags; > u64 ptp_time; > int i; > ACK > ... > >> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h >> index 9e0ff2cec352..92ed421702b9 100644 >> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h >> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h >> @@ -23,9 +23,6 @@ >> #define PTP_STSUR 0x10 /* System Time – Seconds Update Reg */ >> #define PTP_STNSUR 0x14 /* System Time – Nanoseconds Update Reg */ >> #define PTP_TAR 0x18 /* Timestamp Addend Reg */ >> -#define PTP_ACR 0x40 /* Auxiliary Control Reg */ > > Unfortunately this seems to break the build of > drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c > on an x86_64 alllodconfig, as PTP_ACR is used in that file. > >> -#define PTP_ATNR 0x48 /* Auxiliary Timestamp - Nanoseconds Reg */ >> -#define PTP_ATSR 0x4c /* Auxiliary Timestamp - Seconds Reg */ >> >> #define PTP_STNSUR_ADDSUB_SHIFT 31 >> #define PTP_DIGITAL_ROLLOVER_MODE 0x3B9ACA00 /* 10e9-1 ns */ Ouch. thanks for spotting the issue and the providing build details, I'll fix this and wait a bit for more comments before sending v2 > > -- > pw-bot: changes-requested > -- Alexis Lothoré, Bootlin Embedded Linux and Kernel engineering https://bootlin.com