[U-Boot] [RFC PATCH 10/12] linux_compat: introduce GFP_DMA flag for kmalloc()

Masahiro Yamada yamada.masahiro at socionext.com
Wed Jul 8 07:15:57 CEST 2015


Hi Heiko,


2015-07-08 14:10 GMT+09:00 Heiko Schocher <hs at denx.de>:
> Hello Masahiro,
>
> Am 08.07.2015 um 06:29 schrieb Masahiro Yamada:
>>
>> It does not seem efficient to always return cache-aligned memory.
>> Return aligned memory only when GFP_DMA flag is given.
>>
>> My main motivation for this commit is to refactor device_probe()
>> and device_free() in the next commit.  DM_FLAG_ALLOC_PRIV_DMA
>> should be handled more easily.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
>> ---
>>
>>   include/linux/compat.h | 1 +
>>   lib/linux_compat.c     | 5 ++++-
>>   2 files changed, 5 insertions(+), 1 deletion(-)
>
>
> Hmm... I think there are a lot of places in code, where implicit
> is supposed, that kmalloc returns aligned memory ... so this
> patch needs testing (USB, DFU and ethernet coming in my mind)


Right.

I wonder why cache-alignment is enabled by default.
Anybody who knows if it is also true for Linux?



-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list