Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10297104rwb; Fri, 25 Nov 2022 03:20:35 -0800 (PST) X-Google-Smtp-Source: AA0mqf4MkWYUpDFMo1AOd5ovRSqUiq6uN2OjTiicj63tHRV9W2atee9g1aSTFvIqQmuou3If6vYN X-Received: by 2002:a63:501c:0:b0:477:650a:c29a with SMTP id e28-20020a63501c000000b00477650ac29amr15159738pgb.541.1669375235465; Fri, 25 Nov 2022 03:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669375235; cv=none; d=google.com; s=arc-20160816; b=to2OiF5C19ssqXrtk8c025of9QKB2e2fRU8YJpUGm43wIVcETXrUZ9A7PKCCEdM+mr nCnVsippS8D+Ud1Rb1p8eNHOluJXbMWZ6apHPWJ6e2U97nUw17HEJble4HeoeacPCqxd Jw7eRHGTbRZqln9y2I1plAqyIagq9YMJSJw8WAE4CVykAIQXy7y3bVwcXNh+U4kQvT8b Y7rckWEPVS7TeEHCu8TMadthKJvE+J4nbrCGdfZYH08zq8/H9TxCPQZEk+9+gzFalf6f 7a/tKxa8nym31QIFswFQGZvuRbopGh4XoVzLy3ww5kxKH+64STinlIyBcTKo8A6ZIKIj 6yKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=sHNDwussAODPs0bMRD5Q0+uhuwgj3HV2Euo1WwhXFms=; b=ok2HOsLZWZ16AsYlkKINx6NZNlDOURqRDSh1jr8d5udBnrPiqyA+88/eYbVM7bIb1e 6CgDRl7RtfJZdU9H72OeEkQ3sJyfjMqxPK8f0qLoYOXw3hmCqizsMUCxgxBuWGa7L82L OdNqzEU93T4/+HVdSU3Z7GXd2D4FUOhf8uwo/pL3zOXA30L4I0p6Y6NerzYiCOnM8/VO EZSmG4HxwNg3cMEZP09wr5yj47r/A2d12G5rTssYYREVpoym/1cuQ/8QfFaUllDT1xrm Ac5VbpGa3sXaHZ4/t3YowAz7ejTw9gtddw9xV3siucHMiFfJwVzq23ra1gtSeLK2PJMM JoRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm3 header.b=WvsTSkpj; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=fJ0rcyJa; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u14-20020a63df0e000000b00461b7568ad2si4057460pgg.527.2022.11.25.03.20.23; Fri, 25 Nov 2022 03:20:35 -0800 (PST) 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=@arndb.de header.s=fm3 header.b=WvsTSkpj; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=fJ0rcyJa; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229645AbiKYKKL (ORCPT + 86 others); Fri, 25 Nov 2022 05:10:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229536AbiKYKKJ (ORCPT ); Fri, 25 Nov 2022 05:10:09 -0500 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 594C51FFAD for ; Fri, 25 Nov 2022 02:10:09 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C968D5C011C; Fri, 25 Nov 2022 05:10:08 -0500 (EST) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Fri, 25 Nov 2022 05:10:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm3; t=1669371008; x=1669457408; bh=sHNDwussAO DPs0bMRD5Q0+uhuwgj3HV2Euo1WwhXFms=; b=WvsTSkpj57FeW2bCYcSxBN7GZB RPS6+d8Z0kwTQY+YsMFHTPYXUhPpmBpzM6Ijib4RH+CthsoBH7d7qhVMs1xPpKOl 2msAxkxW77eYdm2K+gLQ0VsnVBk9bGZ2/vXTok/XmP5Z2RTc49gyR91hY2Dutp89 pmMyj8xAAHD9Ei7QsNpCxzgtGSitxX37UY50av3jRTQZqAf97Nqus9dH7vJloAA4 mA5yBq3AZwT2LO9UzIbwtgZEHk/aqVk2qpMCm+Eph1c10hKDzhaA2VF2JsaihDhn gxRStJZabserBvI47e8uqsnYBhjRfSbEtv5fdFn8H5ywNOjxUiWDXlLN09eg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1669371008; x=1669457408; bh=sHNDwussAODPs0bMRD5Q0+uhuwgj 3HV2Euo1WwhXFms=; b=fJ0rcyJaeCm/CRMm12MXRsYMFCzv8arZ6TCxIh6NDMHI sjkPltkiy/h8jKPZ1JHPlMFQGY4T0jDmahKzTjKV2bsRsoJwt0tJfHM44j7uBde+ ngcbjypLIGe6x3NS7MQBrgkvFDOM9hIfoDOpRxbht78CWJqpp0Hdr3lehW/PRbjB 7NEYapsfiSDLaubOarcX6k+XFLJu6zwmRZ9DP2jsgtc0TTxHdZYG+2tz61qdFOvy OCV/5ev7CA0mR/KQRqtZeQCZ15bJJdGOXxAUMCOMSY9y8TVzSEscgaFRKtD45xLp SEr+bSwi2fmXxZUJEU2s/wBNLwl0sW+/oue2/+yYNA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrieehgdduvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 6CDCEB60086; Fri, 25 Nov 2022 05:10:08 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1115-g8b801eadce-fm-20221102.001-g8b801ead Mime-Version: 1.0 Message-Id: In-Reply-To: <20221125092517.3074989-2-lee@kernel.org> References: <20221125092517.3074989-1-lee@kernel.org> <20221125092517.3074989-2-lee@kernel.org> Date: Fri, 25 Nov 2022 11:09:48 +0100 From: "Arnd Bergmann" To: "Lee Jones" , "Andrew Morton" , "Nathan Chancellor" , "Maarten Lankhorst" , mripard@kernel.org, "Thomas Zimmermann" , "Dave Airlie" , "Daniel Vetter" , "Nick Desaulniers" , "Tom Rix" , "Harry Wentland" , "Leo Li" , "Rodrigo Siqueira" , "Alex Deucher" , =?UTF-8?Q?Christian_K=C3=B6nig?= , Xinhui.Pan@amd.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 1/3] drm/amd/display/dc/calcs/dce_calcs: Break-out a stack-heavy chunk of code Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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, Nov 25, 2022, at 10:25, Lee Jones wrote: > bw_calcs() presently blows the stack-frame limit by calling functions > inside a argument list which return quite a bit of data to be passed > onto sub-functions. Simply breaking out this hunk reduces the > stack-frame use by 500 Bytes, preventing the following compiler > warning: > > drivers/gpu/drm/amd/amdgpu/../display/dc/dml/calcs/dce_calcs.c:3285:6: > warning: stack frame size (1384) exceeds limit (1024) > in 'bw_calcs' [-Wframe-larger-than] > bool bw_calcs(struct dc_context *ctx, > ^ > 1 warning generated. > > This resolves the issue and takes us one step closer towards a > successful allmodconfig WERROR build. > > Signed-off-by: Lee Jones Is this still needed with the patch to turn off the display engine on most architectures? On which architecture and with which compiler do you still observe the problem? Note that this probably doesn't actually solve the potential stack overflow by itself, since the function that is now split out is still called with the parent stack active. Splitting out multiple smaller bits however would solve it since then the stack frames could overlap. Arnd