#ifndef __CMA_H__#define __CMA_H__/* * There is always at least global CMA area and a few optional * areas configured in kernel .config. */#ifdef CONFIG_CMA_AREAS#define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)#else#define MAX_CMA_AREAS (0)#endifstructcma;externunsignedlongtotalcma_pages;externphys_addr_tcma_get_base(conststructcma*cma);externunsignedlongcma_get_size(conststructcma*cma);externint__initcma_declare_contiguous(phys_addr_tbase,phys_addr_tsize,phys_addr_tlimit,phys_addr_talignment,unsignedintorder_per_bit,boolfixed,structcma**res_cma);externintcma_init_reserved_mem(phys_addr_tbase,phys_addr_tsize,unsignedintorder_per_bit,structcma**res_cma);externstructpage*cma_alloc(structcma*cma,size_tcount,unsignedintalign);externboolcma_release(structcma*cma,conststructpage*pages,unsignedintcount);#endif