From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Thu, 12 Sep 2013 20:53:49 +0200 Subject: [U-Boot] [PATCH] net: fec: Avoid MX28 bus sync issue In-Reply-To: References: <1373583784-7129-1-git-send-email-marex@denx.de> <201309121250.36579.marex@denx.de> <52319F63.2030409@digi.com> <201309121605.04824.marex@denx.de> <20130912181757.5F102380189@gemini.denx.de> Message-ID: <20130912185349.9743B380189@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Fabio Estevam, In message you wrote: > > > 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? What has DMA to do with that? We're talking about alignment only. > At least in the kernel, we don't use stack for DMA buffers. Yes, but them, the kernel uses a much more complicated memory setup, with somewhat different mappings for different regions. We don't do that - or do we? IMO we use a single mapping for the whole RAM ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Far back in the mists of ancient time, in the great and glorious days of the former Galactic Empire, life was wild, rich and largely tax free. - Douglas Adams, _The Hitchhiker's Guide to the Galaxy_