162306a36Sopenharmony_ci===================== 262306a36Sopenharmony_ciCMA Debugfs Interface 362306a36Sopenharmony_ci===================== 462306a36Sopenharmony_ci 562306a36Sopenharmony_ciThe CMA debugfs interface is useful to retrieve basic information out of the 662306a36Sopenharmony_cidifferent CMA areas and to test allocation/release in each of the areas. 762306a36Sopenharmony_ci 862306a36Sopenharmony_ciEach CMA area represents a directory under <debugfs>/cma/, represented by 962306a36Sopenharmony_ciits CMA name like below: 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci <debugfs>/cma/<cma_name> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ciThe structure of the files created under that directory is as follows: 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci - [RO] base_pfn: The base PFN (Page Frame Number) of the zone. 1662306a36Sopenharmony_ci - [RO] count: Amount of memory in the CMA area. 1762306a36Sopenharmony_ci - [RO] order_per_bit: Order of pages represented by one bit. 1862306a36Sopenharmony_ci - [RO] bitmap: The bitmap of page states in the zone. 1962306a36Sopenharmony_ci - [WO] alloc: Allocate N pages from that CMA area. For example:: 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci echo 5 > <debugfs>/cma/<cma_name>/alloc 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ciwould try to allocate 5 pages from the 'cma_name' area. 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci - [WO] free: Free N pages from that CMA area, similar to the above. 26