public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Bolle <pebolle@tiscali.nl>
To: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drm/nouveau/fb: mark ramfuc_reg() noinline
Date: Fri, 10 Jan 2014 11:37:55 +0100	[thread overview]
Message-ID: <1389350275.2528.10.camel@x41> (raw)

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 <pebolle@tiscali.nl>
---
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);
-- 
1.8.4.2


             reply	other threads:[~2014-01-10 10:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 10:37 Paul Bolle [this message]
2014-03-07 13:10 ` [PATCH] drm/nouveau/fb: mark ramfuc_reg() noinline Paul Bolle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389350275.2528.10.camel@x41 \
    --to=pebolle@tiscali.nl \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox