Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1590966ybv; Thu, 20 Feb 2020 23:53:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyvwPuY3QRqL2a2VepGNVsE2/uJc2XsQdHKvcoYF6vC5+bC36dKvS06DubMw0Nmx//IOcQX X-Received: by 2002:aca:e146:: with SMTP id y67mr886418oig.93.1582271588754; Thu, 20 Feb 2020 23:53:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582271588; cv=none; d=google.com; s=arc-20160816; b=KnkuT8GD2nLb4zIfWiUTITW4fFCI9eKdT92eFfAcvNlrmN0zHWfGvFe3sOkb16CYg6 WKDARnaqLYTmICJyFPGsiV++uvaW6iomt5wiAo0veFTC771IMUJKRbZO3YqOItXco548 TgUxYjaPZgnVDSvHOyZwg25Ro2FKTkNIWU1ap0RHolIWqvqfJju3GtiTDeldRE9rEwaG flEBjO0FywXrIfeSsIcL/x3VhYb2vFL1J/6XfhknoBrQeyAS31qO4yzqu2Z2fK+NRYcc D3mYQ7U47jTaec+EJqOxsbzvOlhAtOjd6Y8uDE84ixy79Z6evN1FJjPV5BeHJ+m7UPRu srOg== 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=qQ9b1laktWEOWd8H4+Q2B8xh+5TRBv6lEBe+IC1zFxQ=; b=R6zUlHYaU/PZm95hx26hQjCoOpNdJSC4FhXt+6uDNq007nwmxr0gIkpEuZ37B3xtDS eRAaOwxBsDweKT3CNnaQno7pm42sTe1CsuDRBtVH1UGFFl79P8jFqbRJdJS9wq3Cl2v3 UxS8JlQhUpr6piD1G9w6ylI9roi71MPl+YHqbkM39VU53y4wF5XwK5crS+IRII4+QBeR gtBvG9QkDlcMRr/kfPNIV76rhmekKEG7FwsPIklwcC8+UGO9Ts1L5JE+f3e9sm/9uThi Dl0A6qA2viZKg9BzKiJqRQ+RO4p520uO87gTqP0xZLV+R1+En5pfjzWpB1b5tWXS6gDT LIdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XxtxnbKR; 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 l11si1086456otn.189.2020.02.20.23.52.56; Thu, 20 Feb 2020 23:53:08 -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=XxtxnbKR; 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 S1729985AbgBUHwx (ORCPT + 99 others); Fri, 21 Feb 2020 02:52:53 -0500 Received: from mail.kernel.org ([198.145.29.99]:50814 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728953AbgBUHws (ORCPT ); Fri, 21 Feb 2020 02:52:48 -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 0EA1520578; Fri, 21 Feb 2020 07:52:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582271567; bh=wIqsMrdKLb+D/TuHlWfbWthZCsYzOhhbmcyKf/OfsBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XxtxnbKRaTchZ+GT+iyTOrykgJxoGu13kszGDX6+N9CQY7iPmixZc3Utsy/P0+gH7 YiIW0T2glPiotyJaU4WbNfXo0zHUEcHM6iRJqgpCV8q1lT+t2ch620rgS1AmEA35ZM DN4aAPQBPnqEX8yVOlSV/R1+eVwewoAGBX4hrND8= 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 5.5 215/399] mlx5: work around high stack usage with gcc Date: Fri, 21 Feb 2020 08:39:00 +0100 Message-Id: <20200221072423.900172139@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072402.315346745@linuxfoundation.org> References: <20200221072402.315346745@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 9f09253f9f466..a05158472ed11 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.c @@ -297,6 +297,9 @@ static void mlx5e_grp_sw_update_stats(struct mlx5e_priv *priv) s->tx_tls_drop_bypass_req += sq_stats->tls_drop_bypass_req; #endif s->tx_cqes += sq_stats->cqes; + + /* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92657 */ + barrier(); } } } -- 2.20.1