From: Avi Weiss <thnkslprpt@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
Feng Tang <feng.tang@linux.alibaba.com>,
iommu@lists.linux.dev, linux-kernel@vger.kernel.org,
Avi Weiss <thnkslprpt@gmail.com>
Subject: [PATCH] dma-contiguous: reserve NUMA CMA areas after default reservation failure
Date: Sun, 15 Nov 2026 14:05:35 +0200 [thread overview]
Message-ID: <20261115120534.2331911-2-thnkslprpt@gmail.com> (raw)
dma_contiguous_reserve() returns when reserving the default CMA area
fails, skipping independently configured NUMA CMA areas that might
still be reservable.
Register the default area only when its reservation succeeds, then
continue with NUMA CMA reservation even if the default area fails.
Fixes: 7e6ace2535d0 ("dma-contiguous: add kconfig option to setup numa cma area if not configured explicitly")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
---
kernel/dma/contiguous.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
index 90937dc7c627..0b6500bb6cd9 100644
--- a/kernel/dma/contiguous.c
+++ b/kernel/dma/contiguous.c
@@ -287,8 +287,6 @@ void __init dma_contiguous_reserve(phys_addr_t limit)
selected_limit,
&dma_contiguous_default_area,
fixed);
- if (ret)
- return;
/*
* We need to insert the new area in our list to avoid
@@ -305,9 +303,11 @@ void __init dma_contiguous_reserve(phys_addr_t limit)
* but we also need to insert it in our list to avoid
* having a default area but an empty list.
*/
- ret = dma_contiguous_insert_area(dma_contiguous_default_area);
- if (ret)
- pr_warn("Couldn't queue default CMA region for heap creation.");
+ if (!ret) {
+ ret = dma_contiguous_insert_area(dma_contiguous_default_area);
+ if (ret)
+ pr_warn("Couldn't queue default CMA region for heap creation.");
+ }
}
dma_numa_cma_reserve();
base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
--
2.43.0
reply other threads:[~2026-11-15 12:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261115120534.2331911-2-thnkslprpt@gmail.com \
--to=thnkslprpt@gmail.com \
--cc=feng.tang@linux.alibaba.com \
--cc=iommu@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=robin.murphy@arm.com \
/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®