[U-Boot] Make kmalloc'ed memory really DMA-safe

Tom Rini trini at konsulko.com
Fri Aug 31 21:07:21 UTC 2018


On Fri, Aug 24, 2018 at 07:30:15PM +0900, Masahiro Yamada wrote:

> In Linux, the memory returned by kmalloc() is DMA-capable.
> However, it is not true in U-Boot.
> 
> At a glance, kmalloc() in U-Boot returns address aligned with
> ARCH_DMA_MINALIGN.  However, it never pads the allocated memory.
> This half-way house is completely useless because calling kmalloc()
> and malloc() in this order causes a cache sharing problem.
> 
> Change the implementation to call malloc_cache_aligned(), which
> allocates really DMA-capable memory.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180831/bc4e2f84/attachment.sig>


More information about the U-Boot mailing list