From: Andrew Morton <akpm@linux-foundation.org>
To: Frank van der Linden <fvdl@google.com>
Cc: muchun.song@linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH v2] mm/cma: report base address of single range correctly
Date: Tue, 8 Apr 2025 14:03:57 -0700 [thread overview]
Message-ID: <20250408140357.9a708f7547e48d2da1d2fc34@linux-foundation.org> (raw)
In-Reply-To: <20250408164000.3215690-1-fvdl@google.com>
On Tue, 8 Apr 2025 16:40:00 +0000 Frank van der Linden <fvdl@google.com> 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.
Changes from v1 are:
--- a/mm/cma.c~mm-cma-report-base-address-of-single-range-correctly-v2
+++ a/mm/cma.c
@@ -722,14 +722,15 @@ static int __init __cma_declare_contiguo
}
ret = cma_init_reserved_mem(base, size, order_per_bit, name, res_cma);
- if (ret)
+ if (ret) {
memblock_phys_free(base, size);
- else {
- (*res_cma)->nid = nid;
- *basep = base;
+ return ret;
}
- return ret;
+ (*res_cma)->nid = nid;
+ *basep = base;
+
+ return 0;
}
static void cma_debug_show_areas(struct cma *cma)
_
Which appears to be just a little cleanup?
next prev parent reply other threads:[~2025-04-08 21:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 16:40 Frank van der Linden
2025-04-08 21:03 ` Andrew Morton [this message]
2025-04-08 21:08 ` Frank van der Linden
2025-04-17 7:35 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250408140357.9a708f7547e48d2da1d2fc34@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=fvdl@google.com \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®