31 Aug, 2018

1 commit

  • 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

    Masahiro Yamada
     

22 Jul, 2015

2 commits

  • Currently, kzalloc() returns zero-filled memory, while kmalloc()
    simply ignores the second argument and never fills the memory
    area with zeros.

    I want kmalloc(size, __GFP_ZERO) to behave as kzalloc() does,
    which will make it easier to add more memory allocator variants.

    With the introduction of __GFP_ZERO flag, going forward, kzmalloc()
    variants can fall back to kmalloc() enabling the __GFP_ZERO flag.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Heiko Schocher
    Acked-by: Simon Glass
    Reviewed-by: Lukasz Majewski

    Masahiro Yamada
     
  • The vzalloc(size) is equivalent to kzalloc(size, 0). Move it to
    include/linux/compat.h as an inline function in order to avoid the
    function call overhead.

    Signed-off-by: Masahiro Yamada
    Reviewed-by: Heiko Schocher
    Acked-by: Simon Glass

    Masahiro Yamada
     

26 Aug, 2014

1 commit

  • - move linux specific defines from usb and video code
    into linux/compat.h
    - move common linux specific defines from include/ubi_uboot.h
    to linux/compat.h
    - add for new mtd/ubi/ubifs sync new needed linux specific
    defines to linux/compat.h

    Signed-off-by: Heiko Schocher
    Cc: Marek Vasut
    Cc: Anatolij Gustschin
    [trini: Add spin_lock_irqsave/spin_unlock_irqrestore dummies from
    usb/lin_gadet_compat.h]
    Signed-off-by: Tom Rini

    Heiko Schocher