[U-Boot] [PATCH] net: fec: Avoid MX28 bus sync issue

Fabio Estevam festevam at gmail.com
Thu Sep 12 20:39:12 CEST 2013


On Thu, Sep 12, 2013 at 3:17 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Marek Vasut,
>
> In message <201309121605.04824.marex at denx.de> you wrote:
>>
>> Looking at the code one more time, it'd make most sense to simply allocate the
>> buffer NOT on stack, but with some memalign-kind-of call to avoid this abuse of
>> stack. You see, the max packet size is around 2k, which is quite a lot. How does
>> this proposal sound to you ?
>
> It makes perfect sense to allocate variable with function scope only
> on the stack.  That's what the stack has been invented for.

This buffer in the fec driver will be used in DMA transfer, so maybe
that's the reason we should use malloc instead of using the stack?

At least in the kernel, we don't use stack for DMA buffers.


More information about the U-Boot mailing list