mm-cma-introduce-a-cma-validate-function.patch removed from -mm tree
The quilt patch titled
Subject: mm/cma: introduce a cma validate function
has been removed from the -mm tree. Its filename was
mm-cma-introduce-a-cma-validate-function.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Frank van der Linden <[email protected]>
Subject: mm/cma: introduce a cma validate function
Date: Fri, 28 Feb 2025 18:29:24 +0000
Define a function to check if a CMA area is valid, which means: do its ranges not cross any zone boundaries. Store the result in the newly created flags for each CMA area, so that multiple calls are dealt with.
This allows for checking the validity of a CMA area early, which is needed later in order to be able to allocate hugetlb bootmem pages from it with pre-HVO.
---
include/linux/cma.h | 5 +++ mm/cma.c | 60 +++++++++++++++++++++++++++++++++--------- mm/cma.h | 8 ++++- 3 files changed, 60 insertions(+), 13 deletions(-)
include/linux/cma.h renamed from include/linux/cma.h~mm-cma-introduce-a-cma-validate-function +5 -0
@@ -60,6 +60,7 @@ extern void cma_reserve_pages_on_error(s#ifdef CONFIG_CMA struct folio *cma_alloc_folio (struct cma *cma,int order,gfp_t gfp);bool cma_free_folio (struct cma *cma,const struct folio *folio); +bool cma_validate_zones (struct cma *cma);#else static inline struct folio *cma_alloc_folio (struct cma *cma,int order,gfp_t gfp) {
@@ -70,6 +71,10 @@ static inline bool cma_free_folio(struct {return false; } +static inline bool cma_validate_zones (struct cma *cma) +{ +return false; +}#endif #endif
mm/cma.c renamed from mm/cma.c~mm-cma-introduce-a-cma-validate-function +48 -12
87 lines not on this page · raw message
mm/cma.h renamed from mm/cma.h~mm-cma-introduce-a-cma-validate-function +7 -1
@@ -49,11 +49,17 @@ struct cma {/* kobject requires dynamic object */ struct cma_kobject *cma_kobj;#endif -bool reserve_pages_on_error; +unsigned long flags;/* NUMA node (NUMA_NO_NODE if unspecified) */ int nid; }; +enum cma_flags { +CMA_RESERVE_PAGES_ON_ERROR , +CMA_ZONES_VALID , +CMA_ZONES_INVALID , +}; +extern struct cma cma_areas[MAX_CMA_AREAS ];extern unsigned int cma_area_count;
_
Patches currently in -mm which might be from [email protected] are