[Nouveau] [PATCH] drm/nouveau/fb: Prevent inlining of ramfuc_reg

Ben Skeggs skeggsb at gmail.com
Sat Jun 28 06:04:24 PDT 2014


On Sat, Jun 28, 2014 at 6:17 AM, Stéphane Marchesin
<marcheu at chromium.org> wrote:
> When gcc 4.8 inlines this function, it eats up 16 bytes on the stack
> every time. Eventually we hit warnings because our stack grew too
> much:
>
> ramnve0.c:1383:1: error: the frame size of 1496 bytes is larger than
> 1024 bytes
>
> We fix this by preventing inlining for this function.
Got it.  Thanks!

>
> Signed-off-by: Stéphane Marchesin <marcheu at chromium.org>
> ---
>  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);
> --
> 2.0.0.526.g5318336
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list