Re: [PATCH v2] mtd: avoid stack overflow in MTD CFI code

2016-04-03 Thread Brian Norris
On Fri, Mar 18, 2016 at 09:25:23PM +0100, Arnd Bergmann wrote: > On Friday 18 March 2016 10:44:19 Brian Norris wrote: > > FWIW, I took a little look at this, and I can reproduce this myself. I > > can get a large frame size on at least 2 of the 3 functions you report. > > I think most of the gain y

Re: [PATCH v2] mtd: avoid stack overflow in MTD CFI code

2016-03-19 Thread Brian Norris
On Sat, Mar 05, 2016 at 12:25:24AM +0100, Arnd Bergmann wrote: > On Friday 04 March 2016 13:21:59 Brian Norris wrote: > > > > Looking a little closer at this... why do we need the changes to > > include/linux/mtd/map.h again? It should be fine to leave these > > definitions as-is, right? They don'

Re: [PATCH v2] mtd: avoid stack overflow in MTD CFI code

2016-03-18 Thread Arnd Bergmann
On Friday 18 March 2016 10:44:19 Brian Norris wrote: > On Sat, Mar 05, 2016 at 12:25:24AM +0100, Arnd Bergmann wrote: > > On Friday 04 March 2016 13:21:59 Brian Norris wrote: > > > > > > Looking a little closer at this... why do we need the changes to > > > include/linux/mtd/map.h again? It should

Re: [PATCH v2] mtd: avoid stack overflow in MTD CFI code

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 13:21:59 Brian Norris wrote: > > Looking a little closer at this... why do we need the changes to > include/linux/mtd/map.h again? It should be fine to leave these > definitions as-is, right? They don't contribute to the large stack > usage, do they? > > Maybe I'm just mis

Re: [PATCH v2] mtd: avoid stack overflow in MTD CFI code

2016-03-04 Thread Brian Norris
On Mon, Feb 29, 2016 at 01:20:28PM +0100, Arnd Bergmann wrote: > When map_word gets too large, we use a lot of kernel stack, and for > MTD_MAP_BANK_WIDTH_32, this means we use more than the recommended > 1024 bytes in a number of functions: > > drivers/mtd/chips/cfi_cmdset_0020.c: In function 'cfi

[PATCH v2] mtd: avoid stack overflow in MTD CFI code

2016-02-29 Thread Arnd Bergmann
When map_word gets too large, we use a lot of kernel stack, and for MTD_MAP_BANK_WIDTH_32, this means we use more than the recommended 1024 bytes in a number of functions: drivers/mtd/chips/cfi_cmdset_0020.c: In function 'cfi_staa_write_buffers': drivers/mtd/chips/cfi_cmdset_0020.c:651:1: warning: