From patchwork Fri Jan 10 10:37:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Bolle X-Patchwork-Id: 3465581 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 616FD9F382 for ; Fri, 10 Jan 2014 10:51:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CD2A20122 for ; Fri, 10 Jan 2014 10:51:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E750620121 for ; Fri, 10 Jan 2014 10:51:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B6FC610D66C; Fri, 10 Jan 2014 02:51:01 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 782 seconds by postgrey-1.32 at gabe; Fri, 10 Jan 2014 02:50:59 PST Received: from cpsmtpb-ews05.kpnxchange.com (cpsmtpb-ews05.kpnxchange.com [213.75.39.8]) by gabe.freedesktop.org (Postfix) with ESMTP id BCD3410D66C for ; Fri, 10 Jan 2014 02:50:59 -0800 (PST) Received: from cpsps-ews28.kpnxchange.com ([10.94.84.194]) by cpsmtpb-ews05.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 10 Jan 2014 11:37:55 +0100 Received: from CPSMTPM-TLF103.kpnxchange.com ([195.121.3.6]) by cpsps-ews28.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 10 Jan 2014 11:37:55 +0100 Received: from [192.168.1.111] ([82.169.24.127]) by CPSMTPM-TLF103.kpnxchange.com with Microsoft SMTPSVC(7.5.7601.17514); Fri, 10 Jan 2014 11:37:55 +0100 Message-ID: <1389350275.2528.10.camel@x41> Subject: [PATCH] drm/nouveau/fb: mark ramfuc_reg() noinline From: Paul Bolle To: David Airlie Date: Fri, 10 Jan 2014 11:37:55 +0100 X-Mailer: Evolution 3.10.3 (3.10.3-1.fc20) Mime-Version: 1.0 X-OriginalArrivalTime: 10 Jan 2014 10:37:55.0715 (UTC) FILETIME=[05C51D30:01CF0DF0] X-RcptDomain: lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Building ramnve0.o triggers a GCC warning on 32 bits x86: drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c: In function 'nve0_ram_ctor': drivers/gpu/drm/nouveau/core/subdev/fb/ramnve0.c:1253:1: warning: the frame size of 1496 bytes is larger than 1024 bytes [-Wframe-larger-than=] This warning is caused by ramfuc_reg(), which is inlined 74 times in nve0_ram_ctor(). Mark it noinline to silence this warning. Signed-off-by: Paul Bolle --- Compile tested (on 32 bits x86) only. I've no Nvidia cards at hand, so I can't really test it. This assumes this function - a constructor, apparently - isn't called often, so the overhead calling of 74 functions is acceptable. (The same goes for the similar functions in [...]/ramnva3.c and in [...]/ramnvc0.c, though these call ramfuc_reg() not quite as often.) Perhaps there are other downsides to not inlining this function too. So proper testing will probably be needed. drivers/gpu/drm/nouveau/core/subdev/fb/ramfuc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/ramfuc.h b/drivers/gpu/drm/nouveau/core/subdev/fb/ramfuc.h index 0f57fcf..04e3849 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/fb/ramfuc.h +++ b/drivers/gpu/drm/nouveau/core/subdev/fb/ramfuc.h @@ -26,7 +26,7 @@ ramfuc_reg2(u32 addr1, u32 addr2) }; } -static inline struct ramfuc_reg +static noinline struct ramfuc_reg ramfuc_reg(u32 addr) { return ramfuc_reg2(addr, addr);