From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Wed, 24 Jun 2015 09:17:18 +0200 (CEST) From: Paul Osmialowski Subject: Re: [PATCH 2/9] arm: do not place huge encoder tables on stack when it is too small In-Reply-To: Message-ID: References: <1435094387-20146-1-git-send-email-pawelo@king.net.pl> <1435094387-20146-3-git-send-email-pawelo@king.net.pl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed To: Geert Uytterhoeven Cc: Paul Osmialowski , Andrew Morton , Anson Huang , Ard Biesheuvel , Arnd Bergmann , Bhupesh Sharma , Daniel Lezcano , Frank Li , Geert Uytterhoeven , Greg Kroah-Hartman , Guenter Roeck , Haojian Zhuang , Ian Campbell , Jingchang Lu , Jiri Slaby , Kees Cook , Kumar Gala , Laurent Pinchart , Linus Walleij , Magnus Damm , Michael Turquette , Nathan Lynch , Nicolas Pitre , Maxime Coquelin stm32 , Olof Johansson , Paul Bolle , Rob Herring , Rob Herring , Russell King , Sergey Senozhatsky , Shawn Guo , Simon Horman , Stefan Agner , Stephen Boyd , Thomas Gleixner , Uwe Kleine-Koenig , Catalin Marinas , Dave Martin , Mark Rutland , Pawel Moll , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linux-clk@vger.kernel.org, "linux-gpio@vger.kernel.org" , "linux-serial@vger.kernel.org" , "devicetree@vger.kernel.org" , dmaengine@vger.kernel.org, Yuri Tikhonov , Sergei Poselenov , Dmitry Cherkassov , Alexander Potashev List-ID: Hi Geert, You're right. To be removed. Thanks for spotting this. On Wed, 24 Jun 2015, Geert Uytterhoeven wrote: > On Tue, Jun 23, 2015 at 11:19 PM, Paul Osmialowski wrote: >> Since stack on Cortex-M3 is too small, we need configuration option >> to avoid using it for huge encoder tables of zlib. >> >> Signed-off-by: Paul Osmialowski > >> --- a/lib/zlib_inflate/inflate.c >> +++ b/lib/zlib_inflate/inflate.c >> @@ -75,9 +75,14 @@ int zlib_inflateInit2(z_streamp strm, int windowBits) >> Return state with length and distance decoding tables and index sizes set to >> fixed code decoding. This returns fixed tables from inffixed.h. >> */ >> +#ifdef CONFIG_ZLIB_INFLATE_STACK_SAVING >> +# include "inffixed.h" >> +#endif >> static void zlib_fixedtables(struct inflate_state *state) >> { >> +#ifndef CONFIG_ZLIB_INFLATE_STACK_SAVING >> # include "inffixed.h" > > All variables in inffixed.h are "static const", so they are not on the stack > anyway, and this patch shouldn't make a difference. > >> +#endif > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds >