Loading arch/arm64/configs/vendor/lito-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y CONFIG_MEMORY_HOTPLUG_MOVABLE_NODE=y CONFIG_MEMORY_HOTREMOVE=y CONFIG_CMA=y CONFIG_CMA_DEBUGFS=y CONFIG_ZSMALLOC=y CONFIG_BALANCE_ANON_FILE_RECLAIM=y CONFIG_HAVE_USERSPACE_LOW_MEMORY_KILLER=y Loading arch/arm64/configs/vendor/lito_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ CONFIG_CLEANCACHE=y CONFIG_CMA=y CONFIG_CMA_DEBUG=y CONFIG_CMA_DEBUGFS=y CONFIG_CMA_ALLOW_WRITE_DEBUGFS=y CONFIG_ZSMALLOC=y CONFIG_BALANCE_ANON_FILE_RECLAIM=y CONFIG_HAVE_USERSPACE_LOW_MEMORY_KILLER=y Loading mm/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -529,6 +529,15 @@ config CMA_DEBUGFS help Turns on the DebugFS interface for CMA. config CMA_ALLOW_WRITE_DEBUGFS depends on CMA_DEBUGFS bool "Allow CMA debugfs write" help Say 'y' here to allow the CMA debugfs write. CMA debugfs write could be risky as it allows cma allocation, so it is not recommended to enable this option on any production device. config CMA_AREAS int "Maximum count of the CMA areas" depends on CMA Loading mm/cma_debug.c +10 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ static int cma_maxchunk_get(void *data, u64 *val) } DEFINE_SIMPLE_ATTRIBUTE(cma_maxchunk_fops, cma_maxchunk_get, NULL, "%llu\n"); #ifdef CONFIG_CMA_ALLOW_WRITE_DEBUGFS static void cma_add_to_cma_mem_list(struct cma *cma, struct cma_mem *mem) { spin_lock(&cma->mem_head_lock); Loading Loading @@ -134,8 +135,13 @@ static int cma_free_write(void *data, u64 val) return cma_free_mem(cma, pages); } #else #define cma_free_write NULL #endif DEFINE_SIMPLE_ATTRIBUTE(cma_free_fops, NULL, cma_free_write, "%llu\n"); #ifdef CONFIG_CMA_ALLOW_WRITE_DEBUGFS static int cma_alloc_mem(struct cma *cma, int count) { struct cma_mem *mem; Loading Loading @@ -166,6 +172,10 @@ static int cma_alloc_write(void *data, u64 val) return cma_alloc_mem(cma, pages); } #else #define cma_alloc_write NULL #endif DEFINE_SIMPLE_ATTRIBUTE(cma_alloc_fops, NULL, cma_alloc_write, "%llu\n"); static void cma_debugfs_add_one(struct cma *cma, int idx) Loading Loading
arch/arm64/configs/vendor/lito-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE=y CONFIG_MEMORY_HOTPLUG_MOVABLE_NODE=y CONFIG_MEMORY_HOTREMOVE=y CONFIG_CMA=y CONFIG_CMA_DEBUGFS=y CONFIG_ZSMALLOC=y CONFIG_BALANCE_ANON_FILE_RECLAIM=y CONFIG_HAVE_USERSPACE_LOW_MEMORY_KILLER=y Loading
arch/arm64/configs/vendor/lito_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -111,6 +111,7 @@ CONFIG_CLEANCACHE=y CONFIG_CMA=y CONFIG_CMA_DEBUG=y CONFIG_CMA_DEBUGFS=y CONFIG_CMA_ALLOW_WRITE_DEBUGFS=y CONFIG_ZSMALLOC=y CONFIG_BALANCE_ANON_FILE_RECLAIM=y CONFIG_HAVE_USERSPACE_LOW_MEMORY_KILLER=y Loading
mm/Kconfig +9 −0 Original line number Diff line number Diff line Loading @@ -529,6 +529,15 @@ config CMA_DEBUGFS help Turns on the DebugFS interface for CMA. config CMA_ALLOW_WRITE_DEBUGFS depends on CMA_DEBUGFS bool "Allow CMA debugfs write" help Say 'y' here to allow the CMA debugfs write. CMA debugfs write could be risky as it allows cma allocation, so it is not recommended to enable this option on any production device. config CMA_AREAS int "Maximum count of the CMA areas" depends on CMA Loading
mm/cma_debug.c +10 −0 Original line number Diff line number Diff line Loading @@ -76,6 +76,7 @@ static int cma_maxchunk_get(void *data, u64 *val) } DEFINE_SIMPLE_ATTRIBUTE(cma_maxchunk_fops, cma_maxchunk_get, NULL, "%llu\n"); #ifdef CONFIG_CMA_ALLOW_WRITE_DEBUGFS static void cma_add_to_cma_mem_list(struct cma *cma, struct cma_mem *mem) { spin_lock(&cma->mem_head_lock); Loading Loading @@ -134,8 +135,13 @@ static int cma_free_write(void *data, u64 val) return cma_free_mem(cma, pages); } #else #define cma_free_write NULL #endif DEFINE_SIMPLE_ATTRIBUTE(cma_free_fops, NULL, cma_free_write, "%llu\n"); #ifdef CONFIG_CMA_ALLOW_WRITE_DEBUGFS static int cma_alloc_mem(struct cma *cma, int count) { struct cma_mem *mem; Loading Loading @@ -166,6 +172,10 @@ static int cma_alloc_write(void *data, u64 val) return cma_alloc_mem(cma, pages); } #else #define cma_alloc_write NULL #endif DEFINE_SIMPLE_ATTRIBUTE(cma_alloc_fops, NULL, cma_alloc_write, "%llu\n"); static void cma_debugfs_add_one(struct cma *cma, int idx) Loading