[PATCH v2 0/3] cma: factor out allocation logic from __cma_declare_contiguous_nid

From: Mike Rapoport
Date: Thu Jul 03 2025 - 14:47:35 EST


From: "Mike Rapoport (Microsoft)" <rppt@xxxxxxxxxx>

Hi,

We've discussed earlier that HIGHMEM related logic is spread all over
__cma_declare_contiguous_nid().

These patches decouple it into helper functions.

v2 changes:
* use already declared 'ret' rather than 'err' (Oscar)
* rather than factor out only HIGHMEM allocation move all of the
allocation logic to a helper (Oscar and David)
* add Acks, thanks!

v1: https://lore.kernel.org/all/20250702173605.2198924-1-rppt@xxxxxxxxxx

[1] https://lore.kernel.org/all/aCw9mpmhx9SrL8Oy@localhost.localdomain

Mike Rapoport (Microsoft) (3):
cma: move __cma_declare_contiguous_nid() before its usage
cma: split resrvation of fixed area into a helper function
cma: move allocation from HIGHMEM to a helper function

mm/cma.c | 315 +++++++++++++++++++++++++++++--------------------------
1 file changed, 165 insertions(+), 150 deletions(-)


base-commit: 86731a2a651e58953fc949573895f2fa6d456841
--
2.47.2

*** BLURB HERE ***

Mike Rapoport (Microsoft) (3):
cma: move __cma_declare_contiguous_nid() before its usage
cma: split resrvation of fixed area into a helper function
cma: move memory allocation to a helper function

mm/cma.c | 312 +++++++++++++++++++++++++++++--------------------------
1 file changed, 162 insertions(+), 150 deletions(-)


base-commit: 86731a2a651e58953fc949573895f2fa6d456841
--
2.47.2