Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1617012ybv; Fri, 21 Feb 2020 00:21:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzCTFcwBqjoyw2yQPQ6BxXjBmV3ZgRvnkeMCkf8SpBs9uLJSgK7S8JXn8mBLExpTvIPM5av X-Received: by 2002:a05:6808:3b2:: with SMTP id n18mr983404oie.146.1582273319593; Fri, 21 Feb 2020 00:21:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582273319; cv=none; d=google.com; s=arc-20160816; b=ntnedNHCT7EitL+vp6UtGTC13xm/6tGlX1MID0ROJBNLjlvEap7m1zLFOM9ZF9/dMb +mgJDcny0Cj6abjmtflde79gnlL8S7EoCrjwahCrttB9OZ5mvpPauxNGlFvSKJwuURod fAAQ1Gxxtc8vbaNrRa71/CNX159aUGhh94MDs14wQwadSsTFHF876iBHgtJ8mYHUvF6+ 8MBKAzUhsCAKCuCI4cRrwVU3NxvfoRA6SxKhk5AjFNDFWXAL5+ZvGViZedXchqYex/o4 Pdcxyu9qTFotQEDa0egjXESoqca4FFXBBhBpWtMA1n15EM5q/RfByrRPWuVLjwbZ4CvG BWtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dxSLlTZdzVNXJWSGD2Ixr3t8Pgqowrkxzi8FoVRA538=; b=Wup0j4tC5yk4y8AfeEITSCPmKeOR/cwaEsoVH7aXH4+KDV2c33W+ikUhFo8giSKiAP RICJFQKjNtPhI6h5ltdHR9s2iaq2eYpI+hTlANatJL9yJX2dQjS0zl9UC7BK8qYTdrrf QZzBHWrvgAYbDwfKmlfO7MWdTMD2FxMB7VoPql02MFRt+VrIgnh/Dofs5dR6SbbtI+6g pBHzGNWnDXVRLpRZ8ELmEvs7Y0kfyVoqiG64WDLLYy1TlXGMQIdvRsdY6PAIvSoWXJVf XnJHChl/pUj/w0YGp1s785pe02s5b2u5NhEIW17L0sUxHu2xAIkW05jZ9MstcWzgTOaN Ceiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oGW5tyB5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20si1060791otr.202.2020.02.21.00.21.47; Fri, 21 Feb 2020 00:21:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oGW5tyB5; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387965AbgBUIUw (ORCPT + 99 others); Fri, 21 Feb 2020 03:20:52 -0500 Received: from mail.kernel.org ([198.145.29.99]:60076 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387967AbgBUIUt (ORCPT ); Fri, 21 Feb 2020 03:20:49 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 10637206ED; Fri, 21 Feb 2020 08:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582273248; bh=k4MAyLiQvbkcRfoaIpeTeeZXxVI0Sn7O1+qJM6lHONc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oGW5tyB5ynxFVwYj3riM72+LaJCEnIm+StXlqbCHiEsiHw2GgEYWdUdoQt6U8YIbE bj56rKoWB4400JKeCAXmz0a+r9Z23pMCeUrx4W9t3JJ7dwV0SZYGkRM4am0vLfL12n qK5DRXzzVK+ZH07ZbVQQPwDyYScwii6suzEj6/AE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adhemerval Zanella , Arnd Bergmann , Saeed Mahameed , Sasha Levin Subject: [PATCH 4.19 101/191] mlx5: work around high stack usage with gcc Date: Fri, 21 Feb 2020 08:41:14 +0100 Message-Id: <20200221072303.164897797@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072250.732482588@linuxfoundation.org> References: <20200221072250.732482588@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 42ae1a5c76691928ed217c7e40269db27f5225e9 ] In some configurations, gcc tries too hard to optimize this code: drivers/net/ethernet/mellanox/mlx5/core/en_stats.c: In function 'mlx5e_grp_sw_update_stats': drivers/net/ethernet/mellanox/mlx5/core/en_stats.c:302:1: error: the frame size of 1336 bytes is larger than 1024 bytes [-Werror=frame-larger-than=] As was stated in the bug report, the reason is that gcc runs into a corner case in the register allocator that is rather hard to fix in a good way. As there is an easy way to work around it, just add a comment and the barrier that stops gcc from trying to overoptimize the function. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92657 Cc: Adhemerval Zanella Signed-off-by: Arnd Bergmann Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_stats.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c index 8255d797ea943..9a68dee588c1a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c @@ -211,6 +211,9 @@ void mlx5e_grp_sw_update_stats(struct mlx5e_priv *priv) s->tx_tls_resync_bytes += sq_stats->tls_resync_bytes; #endif s->tx_cqes += sq_stats->cqes; + + /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92657 */ + barrier(); } } -- 2.20.1