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 X-Spam-Level: X-Spam-Status: No, score=-13.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD9DFC433E1 for ; Tue, 30 Mar 2021 08:19:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 601DB6157F for ; Tue, 30 Mar 2021 08:19:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231527AbhC3IS4 (ORCPT ); Tue, 30 Mar 2021 04:18:56 -0400 Received: from esa.microchip.iphmx.com ([68.232.154.123]:23463 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231430AbhC3ISs (ORCPT ); Tue, 30 Mar 2021 04:18:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1617092328; x=1648628328; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=+gyuP2o8c81Fb8w4sK4HiD0tTwx8CqW4Of6BFZ8CVpc=; b=t3lD7ORaiAP00DXQRqkPI9L3sr63eH5EQ+Yu7fmR630sinq7Kko4AD3Z 4SXj8YwQ6fKqCEVjeGWHHntWeyEWTdWQ5mnX8u8jL3gaO65cUvHUrM9df I8asi7FUnDiMZjNuUBZxqxkkHMFQ2JyXPIEe4Xw0AGiWojFPnch5Ar6KV uFQoeTqQrwSr7n1hZprU2otAe0WUKVDEXFZVQviGpu6KL+8vPn8kog7vt NOFsYtQk/QFJVYMhQqanohFrS8d/wQivERMod6FOdWqtrfVUoNQsdiT22 h1TZv1RxQYxC7PY4PrMZL17D+p07UKPlyQtRS0gp2CagNb5rtvLrwfojj A==; IronPort-SDR: QOiXiy9v2yvWnu8splEZ7FCYjwOfZM9vsj+WkXS+Ez26JD7zAOsNo4nzyLB2nsJ/WVcL2p3uTd O0uYjcYzeP/WhLEfyD/Lbmvc+voqrTSDy0qTo7Om24f2skespBOB74BjMZpChKCSacFt0W++Pk jE+7GPbFvPCEFnbrIdeAb/v6OVaDpieiKwP3T+WBV6TwzB1t7uS2DRu6//8HbtBXpSBt2uWOz2 E4aytVlV2W/oowrvLX+GN+pxdmYRPj6Zams5vQCQ/342xeshie3Ug3HEZZ8oklUiV8JxboZuC2 H3U= X-IronPort-AV: E=Sophos;i="5.81,290,1610434800"; d="scan'208";a="49364921" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 Mar 2021 01:18:47 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 30 Mar 2021 01:18:47 -0700 Received: from den-her-m31857h.microchip.com (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 30 Mar 2021 01:18:45 -0700 Message-ID: <2356027828f1fa424751e91e478ff4bc188e7f6d.camel@microchip.com> Subject: Re: [PATCH linux-next 1/1] phy: Sparx5 Eth SerDes: Use direct register operations From: Steen Hegelund To: Andrew Lunn CC: Kishon Vijay Abraham I , Vinod Koul , , Alexandre Belloni , Microchip UNG Driver List , , , kernel test robot Date: Tue, 30 Mar 2021 10:18:44 +0200 In-Reply-To: References: <20210329081438.558885-1-steen.hegelund@microchip.com> <20210329081438.558885-2-steen.hegelund@microchip.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andrew, On Mon, 2021-03-29 at 20:55 +0200, Andrew Lunn wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe > > On Mon, Mar 29, 2021 at 10:14:38AM +0200, Steen Hegelund wrote: > > Use direct register operations instead of a table of register > > information to lower the stack usage. > > > > Signed-off-by: Steen Hegelund > > Reported-by: kernel test robot > > --- > > drivers/phy/microchip/sparx5_serdes.c | 1869 +++++++++++++------------ > > 1 file changed, 951 insertions(+), 918 deletions(-) > > > > diff --git a/drivers/phy/microchip/sparx5_serdes.c b/drivers/phy/microchip/sparx5_serdes.c > > index 06bcf0c166cf..43de68a62c2f 100644 > > --- a/drivers/phy/microchip/sparx5_serdes.c > > +++ b/drivers/phy/microchip/sparx5_serdes.c > > @@ -343,12 +343,6 @@ struct sparx5_sd10g28_params { > > u8 fx_100; > > }; > > > > -struct sparx5_serdes_regval { > > - u32 value; > > - u32 mask; > > - void __iomem *addr; > > -}; > > - > > static struct sparx5_sd25g28_media_preset media_presets_25g[] = { > > { /* ETH_MEDIA_DEFAULT */ > > .cfg_en_adv = 0, > > @@ -945,431 +939,411 @@ static void sparx5_sd25g28_reset(void __iomem *regs[], > > } > > } > > > > -static int sparx5_sd25g28_apply_params(struct device *dev, > > - void __iomem *regs[], > > - struct sparx5_sd25g28_params *params, > > - u32 sd_index) > > +static int sparx5_sd25g28_apply_params(struct sparx5_serdes_macro *macro, > > + struct sparx5_sd25g28_params *params) > > { > > - struct sparx5_serdes_regval item[] = { > > Could you just add const here, and then it is no longer on the stack? > > Andrew No it still counts against the stack even as a const structure. BR Steen