Re: [PATCH v2] mm/cma: report base address of single range correctly

From: Geert Uytterhoeven
Date: Thu Apr 17 2025 - 03:35:58 EST


Hi Frank,

On Tue, 8 Apr 2025 at 18:40, Frank van der Linden <fvdl@xxxxxxxxxx> wrote:
> The cma_declare_contiguous_nid code was refactored by
> commit c009da4258f9 ("mm, cma: support multiple contiguous
> ranges, if requested"), so that it could use an internal
> function to attempt a single range area first, and then
> try a multi-range one.
>
> However, that meant that the actual base address used for
> the !fixed case (base == 0) wasn't available one level up
> to be printed in the informational message, and it would
> always end up printing a base address of 0 in the boot
> message.
>
> Make the internal function take a phys_addr_t pointer to
> the base address, so that the value is available to the
> caller.
>
> Fixes: c009da4258f9 ("mm, cma: support multiple contiguous ranges, if requested")
> Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Closes: https://lore.kernel.org/linux-mm/CAMuHMdVWviQ7O9yBFE3f=ev0eVb1CnsQvR6SKtEROBbM6z7g3w@xxxxxxxxxxxxxx/

Thanks for your patch, which is now commit 60580e0bd587b1df ("mm/cma:
report base address of single range correctly") upstream.

> Tested-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>

FTR, the email addres in this tag does not match the tag given in
https://lore.kernel.org/all/CAMuHMdUeGjbOx-aJTvwOVBWdUFmY7wU-p3mKaCbEzQ4PbJDqNg@xxxxxxxxxxxxxx

> Signed-off-by: Frank van der Linden <fvdl@xxxxxxxxxx>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds