Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2673968rwd; Fri, 16 Jun 2023 06:54:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5kWC4/jCgpA10Ex2KGpWZCreQRV0d6KF02/re9fzxLwhocydQ6owSBqo2I01B40hjYL7sR X-Received: by 2002:a05:6a00:21ce:b0:666:64fb:b129 with SMTP id t14-20020a056a0021ce00b0066664fbb129mr2613566pfj.27.1686923698526; Fri, 16 Jun 2023 06:54:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1686923698; cv=pass; d=google.com; s=arc-20160816; b=AqvQxRHWsXCkG24auXiigQ1TqN0V4CyP3ww2U6fpw0qLj0oYk6Orc6qUWPwo1BatpZ Kn8ZQEKoFnlRVCqx82/jc4tE41Pjh2tG945LYMyRS0tkL8sFZPwrQuqN5uG/qW11V7LD UhSDJdE6KIi8ryazBIrAPz6DFRN9GdEM2jwp4qs+LPbpBQbceHiPBPUbga+aFJR/64NH oaPh0kj37+RWL7JYx4cnietfPHvslg5bR76U5XYeSueVvkhEbbFMyT+4pkrRLu8u/egX nusassiLmkYqHSBu4I1crnFQKHJ964lO+0lNIq2s9VcYJNAjQ9TrskfX4Vd17RpcqOiO TpaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to :content-transfer-encoding:content-disposition:references:message-id :subject:cc:to:from:date:dkim-signature; bh=MDGLgsnVK2pDQSL+JffKvAe970DrwfRVp4XtOdPqoUw=; b=WizlteXH9o/g/hc957seZBNLVjwmXWkijJ//E7tBApX+L16ksowr4gtrQLaneFefIr Bb7eGHlId41ZmwYUfziQzIGCOQVVb+aUR9+llipwW5PiNEY/UptuiCmHEtJHWB+Udr7O qgCL5A8ft4iXB8t/AbJhEVy7qkx/7i4um7wDCX7T+EbKXrtloeKnJTxgeZNRLuBL8OUW pzwd1dj0YKlBww7dvq4mdAUgh0fbBl7IWoq43M0hISxqr31nGWRwT6HsxaNY6v/JjF6m yijhUVrSqbvYGR22S7FyvhM+Ol+wWZtu+k2xMj8C71udQOjJAixrAEdHjImVU3ilcSmT LrcQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="Djqoadl/"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h69-20020a638348000000b0054fd6863325si5485695pge.726.2023.06.16.06.54.44; Fri, 16 Jun 2023 06:54:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@corigine.onmicrosoft.com header.s=selector2-corigine-onmicrosoft-com header.b="Djqoadl/"; arc=pass (i=1 spf=pass spfdomain=corigine.com dkim=pass dkdomain=corigine.com dmarc=pass fromdomain=corigine.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=corigine.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344061AbjFPNed (ORCPT + 99 others); Fri, 16 Jun 2023 09:34:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345254AbjFPNe2 (ORCPT ); Fri, 16 Jun 2023 09:34:28 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2092.outbound.protection.outlook.com [40.107.223.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E35DE3C05; Fri, 16 Jun 2023 06:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rj13uQkjD0Q8KuX1JdcMhGPftR0iWvyLNsfFyCwU3h5SH+uXElSmOtUf2g8lt5ih1khWqBPEulHXIkXGfF1zjo9L5bGBDSp9QVh8xsEoMaBMm5BJhS19BMT1DXmL71uISpTStejidB4t2pZGnyysQrp2asJhHFO217hXxQW/D8EI2FOj76Kv/KUjOxaVkIV8BnbU/C/lCssUBR9eKsKtTXCF+grrd5spGvHlTLU4FHH9QlosVeZTA2t0frJfSfSxKnafLAgu08tNW4lby6dSjve7Spy2klzWYGAucbaneWtaizRKK4F3IstyaM/fAArvyxkSVfgmDf1ismmZOQ3Qvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MDGLgsnVK2pDQSL+JffKvAe970DrwfRVp4XtOdPqoUw=; b=HDF2gjBCx57wfnlcMd4v5sELAHYKSNPNtWxNlO2/i1enZTOCH/HzJHgfciufiEL1OKmfn3af6jXnQ6k2Xr4iHvA4kdN9Ma5Qimw9uS0ddhdDZyEiaIoYycGuhkBMsxb0AziLOeMEV9TaBchxGnLApioZMp/Wcxgnjhn6tsyIJIvQkUmxGNdoOYyDlFGf4dgBHresfQp4vC2Q40EmGkcv0lyZU2owDzXl1rSBjqbbgs/TjTi5O70ebmcRsryjvln6Cyodtrms0oKm/edWYJA0BTBauIwD+3URlJS3ksBLzR8yv5gSCzpRuR8hWa3PeVOzuxYB21oluOjMtruBN9OgQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=corigine.com; dmarc=pass action=none header.from=corigine.com; dkim=pass header.d=corigine.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=corigine.onmicrosoft.com; s=selector2-corigine-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MDGLgsnVK2pDQSL+JffKvAe970DrwfRVp4XtOdPqoUw=; b=Djqoadl/JB5sBKU8rBF/hujmHhRSlEH1x5Zr/SS/dRsWgh8FPz57DxvPLBx/Slt01BtBfT3SqGXUVOvl3i3/EzURp7qLxe4TW4nkqdYDV/4C2x0bjKdH2DfDmUj5WWNEtjpas+m7b+Wz7MxPJ/Lyp4US0c8dso9gWVPnKvb5yeA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=corigine.com; Received: from PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) by BN0PR13MB4741.namprd13.prod.outlook.com (2603:10b6:408:115::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6500.29; Fri, 16 Jun 2023 13:34:09 +0000 Received: from PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e]) by PH0PR13MB4842.namprd13.prod.outlook.com ([fe80::eb8f:e482:76e0:fe6e%5]) with mapi id 15.20.6500.025; Fri, 16 Jun 2023 13:34:09 +0000 Date: Fri, 16 Jun 2023 15:34:01 +0200 From: Simon Horman To: alexis.lothore@bootlin.com 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 Subject: Re: [PATCH net-next 3/8] net: stmmac: move PTP interrupt handling to IP-specific DWMAC file Message-ID: References: <20230616100409.164583-1-alexis.lothore@bootlin.com> <20230616100409.164583-4-alexis.lothore@bootlin.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230616100409.164583-4-alexis.lothore@bootlin.com> X-ClientProxiedBy: AM0PR10CA0120.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:208:e6::37) To PH0PR13MB4842.namprd13.prod.outlook.com (2603:10b6:510:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH0PR13MB4842:EE_|BN0PR13MB4741:EE_ X-MS-Office365-Filtering-Correlation-Id: 99287348-1802-447b-ce56-08db6e6e5d5f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X0UMqj5KhexdE1v9+qug3hTBJSoXWmvve8HcAxkMddVK6IwkLLtjdav+dAFLU072pFA+HtPwq4bWhnofAg0l9gp6Gw/MfebLZxy5+ZEWIFfRGJTg/ErgQtd5ZEbRC/S/lTlf1TbQMtPobmZCF5elOZ92hfYmmpzc2RsMVd0eeklQk9Oun5gJ16K1UEE3wFLZ67YLHWUe7RsFGdL4aa1rgAW6ygGi1HbpAY8TEYNj5DGePtuPsemq5uVygEktB3jvwyTxkktoLe+kUMYy4iqVSpxaLiUdGDd775hBor/pPAQ43oLO3rwONYyU1FIP6vi3gVpCIEXkwnSgXXDE1pPqC8NN+fAiR8qU9Pd7dga6QKEw/R5TOfGvkS6I1pEYS0az63q5oGTzDtbDc4BcRCMX9/GVPA657lHZz1AygyQ7ZTX110Zf9ElZEaaTepsCGUUjKM8IJYAmbUP/keepUYvp4HYCuWglsSPetTYdsq1HCuQP5VtGOckU1ry34nChZ7JzwbMLjoN8kJEJBPDZEM8XNTgFYFS8xLM6CARTr6NF0+s7TlEy3IrQktsDbAKN5KR9DZ08nc2L7l6L6bYBqke0skrxYFajTH57AZ1hAETVefc= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR13MB4842.namprd13.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(39840400004)(366004)(136003)(396003)(451199021)(6512007)(6506007)(186003)(6916009)(4326008)(66946007)(316002)(66476007)(66556008)(2616005)(83380400001)(6666004)(6486002)(54906003)(478600001)(38100700002)(7416002)(44832011)(8936002)(5660300002)(86362001)(41300700001)(8676002)(2906002)(36756003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?a05zb0lVVmUzT0N6QTVhWWF6N2lIUVp4RFBwSUxudUdhVStRS21SbEJqcWo3?= =?utf-8?B?NWQ0M0tLa2tLRHZzRTFZb1Z1MU9xeTlFc0szUXR6L0hXOTdZdG51c21NRDJK?= =?utf-8?B?SFNGZVlYY2hUdENrdVVoQVdOZW5VcUlVZ1VGbGF6ME82RkdMSEtaNGw1Q2tm?= =?utf-8?B?WlMwNVBQS2xWRTdaRGVWVS9HdkNWQldYUVVnZno4ekEvM0hhS1BFQUNSRlBm?= =?utf-8?B?MDZFZEZiUWlOVUlmUjFSYkxlM1pMV0Exck0yWXJGKy9TbGFUTXZoM29lRlhH?= =?utf-8?B?ZXdpNEcrZTlDejRuRkVnd1MraXFaOUhoZ2xsQis3M21zeDhkb0hJcUd0SUxa?= =?utf-8?B?YjJJVi9za2w3TFhxMmpoaUJGYlc1TGI5dXpNdWRuRjVydUIzaTdBaWFsd1Ji?= =?utf-8?B?b056MDBPK2N1UGo2eEpZSGVRK210eEMyNG9TZG0xeVNmbkE0VVEzcmcza1k1?= =?utf-8?B?MkFVRjMyN2l1M0ExditVWlZOekZUOE5CVzlqakN1UG9YSUs5NC9JS3lYem9I?= =?utf-8?B?OHJVUH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?B?ZjJEN0FDb0VKWmNTckFKWUJYMmhnQmxSOU1rL2UraFBMbWcxQ2xMeWlBSU93?= =?utf-8?B?N04zUy9RdmVDMnNkeldSRU03b3BmRXkwR01PM3BuMnZvNjJXQnVJR25OVFVE?= =?utf-8?B?WTZUcnQvTmc3L244ZnZFSlpIQlFQL0ZtN0Q3S3BETmZrNFp6U0x3TUM3cjRs?= =?utf-8?B?NjkwZjNyNnZIOE1aV3Z0d1ZnKzZtTS9tdmhmbFJuU0NyTjVwOWFTcUNZQSt3?= =?utf-8?B?WnI0TzFPc0t0N2paY3hhVzFRWWs1VElNYzZnbVFFd3RXUXgrUjZTSnIyUFAv?= =?utf-8?B?OFErUkFIYm1mWk9mV2V2YU1HNUgwUzgwV3pCbndtVyt6bVg1Um1UUEZvVlk1?= =?utf-8?B?NTdTS2hnUWpwa29uVU1oWFU1QmxXRjlMNjlabHNPaG5sNGNvSXk3b0VlUitT?= =?utf-8?B?bTN4Tm0wQUVGMmNoekFNY0hQU0luNktjUFVJS2JHdytzUTlNbGlGL3Bib3Vi?= =?utf-8?B?TzA4THhwL2ExNy90MWpvMFlVSjFiZHhkOWJnOG9JYUtHbVBmWW1uNTluMUpL?= =?utf-8?B?OWlNZTNYeTd1bngwWHd4QncxVTdiTHNxb0RpN1M0Q25kMHlkQXVlcVNKVkJB?= =?utf-8?B?TDZkT0VoQ2RScjZjU2JVRzRHUmppcElLbTNtRzJDRTNGR2tSMG4zTGdMc3Vq?= =?utf-8?B?cGR2T3ppS2lJUXdZZm1nQTU2NXdNTDJNYUhveGxWTklVclFuSVRjeWZvWkov?= =?utf-8?B?UFIyekd3ZVFNcWUwSGx2ejlJVDNwSVNpd2dMaGlSTGJqejhOaWRqZTFHbFVP?= =?utf-8?B?YXBLOGZZNFMwV3RNVFFmcDJqelJBPT0=?= X-OriginatorOrg: corigine.com X-MS-Exchange-CrossTenant-Network-Message-Id: 99287348-1802-447b-ce56-08db6e6e5d5f X-MS-Exchange-CrossTenant-AuthSource: PH0PR13MB4842.namprd13.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jun 2023 13:34:09.6730 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fe128f2c-073b-4c20-818e-7246a585940c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: jqBudurq9dnoXiUo/HTgJOgR3H7rzSl/+Od22PTRe4KvHDrE/GOyZIPPySSkIPN9+NViBFPd7F/zvN/+PEN5VQga7erDTKCW9dcoAfo4DH0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR13MB4741 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; ... > 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 */ -- pw-bot: changes-requested