27 Aug, 2013

1 commit

  • This patch cleans the initialization of dma contiguous framework. The
    all-in-one dma_declare_contiguous() function is now separated into
    dma_contiguous_reserve_area() which only steals the the memory from
    memblock allocator and dma_contiguous_add_device() function, which
    assigns given device to the specified reserved memory area. This improves
    the flexibility in defining contiguous memory areas and assigning device
    to them, because now it is possible to assign more than one device to
    the given contiguous memory area. Such split in initialization procedure
    is also required for upcoming device tree support.

    Signed-off-by: Marek Szyprowski
    Acked-by: Kyungmin Park
    Acked-by: Michal Nazarewicz
    Acked-by: Tomasz Figa

    Marek Szyprowski
     

02 Jul, 2013

1 commit

  • We want to use CMA for allocating hash page table and real mode area for
    PPC64. Hence move DMA contiguous related changes into a seperate config
    so that ppc64 can enable CMA without requiring DMA contiguous.

    Acked-by: Michal Nazarewicz
    Acked-by: Paul Mackerras
    Signed-off-by: Aneesh Kumar K.V
    [removed defconfig changes]
    Signed-off-by: Marek Szyprowski

    Aneesh Kumar K.V
     

11 Dec, 2012

1 commit

  • This commit changes the CMA early initialization code to use phys_addr_t
    for representing physical addresses instead of unsigned long.

    Without this change, among other things, dma_declare_contiguous() simply
    discards any memory regions whose address is not representable as unsigned
    long.

    This is a problem on 32-bit PAE machines where unsigned long is 32-bit
    but physical address space is larger.

    Signed-off-by: Vitaly Andrianov
    Signed-off-by: Cyril Chemparathy
    Acked-by: Michal Nazarewicz
    Signed-off-by: Marek Szyprowski

    Vitaly Andrianov
     

21 May, 2012

1 commit

  • The Contiguous Memory Allocator is a set of helper functions for DMA
    mapping framework that improves allocations of contiguous memory chunks.

    CMA grabs memory on system boot, marks it with MIGRATE_CMA migrate type
    and gives back to the system. Kernel is allowed to allocate only movable
    pages within CMA's managed memory so that it can be used for example for
    page cache when DMA mapping do not use it. On
    dma_alloc_from_contiguous() request such pages are migrated out of CMA
    area to free required contiguous block and fulfill the request. This
    allows to allocate large contiguous chunks of memory at any time
    assuming that there is enough free memory available in the system.

    This code is heavily based on earlier works by Michal Nazarewicz.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Kyungmin Park
    Signed-off-by: Michal Nazarewicz
    Acked-by: Arnd Bergmann
    Tested-by: Rob Clark
    Tested-by: Ohad Ben-Cohen
    Tested-by: Benjamin Gaignard
    Tested-by: Robert Nelson
    Tested-by: Barry Song

    Marek Szyprowski