From: Suseendran Bhaskaran <suseendranb@google.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>, Dan Williams <djbw@kernel.org>,
David Hildenbrand <david@kernel.org>
Cc: Alexander Graf <graf@amazon.com>,
Alison Schofield <alison.schofield@intel.com>,
Andy Lutomirski <luto@kernel.org>,
Borislav Petkov <bp@alien8.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Changyuan Lyu <changyuanl@google.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Dave Jiang <dave.jiang@intel.com>,
David Rientjes <rientjes@google.com>,
Frank van der Linden <fvdl@google.com>,
"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>,
Ira Weiny <iweiny@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
"Liam R. Howlett" <liam@infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
Michal Hocko <mhocko@suse.com>,
Oscar Salvador <osalvador@suse.de>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Peter Zijlstra <peterz@infradead.org>,
Pratyush Yadav <pratyush@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Thomas Gleixner <tglx@kernel.org>,
Vishal Verma <vishal.l.verma@intel.com>,
Vlastimil Babka <vbabka@kernel.org>,
Will Deacon <will@kernel.org>,
kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org,
linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
nvdimm@lists.linux.dev, x86@kernel.org,
Suseendran Bhaskaran <suseendranb@google.com>
Subject: [RFC PATCH 09/11] nvdimm/ramdax: support binding extmem platform devices
Date: Wed, 2 Dec 2026 00:19:44 +0000 [thread overview]
Message-ID: <20261202001946.1226273-10-suseendranb@google.com> (raw)
In-Reply-To: <20261202001946.1226273-1-suseendranb@google.com>
Block-backed fsdax filesystems (such as XFS or ext4 mounted with -o dax)
need /dev/pmemX block devices on the libnvdimm bus rather than character
drivers/dax devices.
Allow CONFIG_RAMDAX when CONFIG_EXTMEM is enabled (including x86_64
configs without X86_PMEM_LEGACY or OF) and match "extmem" platform
devices via driver_override alongside OF pmem-region and e820_pmem (also
enabling ACPI arm64 hosts), registering each IORESOURCE_MEM range as a
labeled NVDIMM DIMM.
Signed-off-by: Suseendran Bhaskaran <suseendranb@google.com>
---
Documentation/admin-guide/kernel-parameters.txt | 4 +++-
drivers/nvdimm/Kconfig | 14 +++++++-------
drivers/nvdimm/ramdax.c | 7 ++++---
3 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index e75b35d9a66b..d25265bb0095 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -1704,7 +1704,9 @@ Kernel parameters
dax_hmem matches "extmem" devices by default, exposing
device_dax instances at PUD or PMD alignment (configurable
via daxctl, or left idle at boot with
- dax_hmem.region_idle=1).
+ dax_hmem.region_idle=1). Regions can also be bound to the
+ ramdax driver via driver_override to expose libnvdimm
+ /dev/pmemX block devices for fsdax filesystems.
<align> defaults to and must be at least the sparsemem
section size (128 MiB on 4K/16K pages, 512 MiB on 64K
pages), and <size> must be a multiple of <align>.
diff --git a/drivers/nvdimm/Kconfig b/drivers/nvdimm/Kconfig
index 33d83623bfc0..2a094ed1dba0 100644
--- a/drivers/nvdimm/Kconfig
+++ b/drivers/nvdimm/Kconfig
@@ -99,21 +99,21 @@ config OF_PMEM
config RAMDAX
tristate "Support persistent memory interfaces on RAM carveouts"
- depends on X86_PMEM_LEGACY || OF || COMPILE_TEST
+ depends on X86_PMEM_LEGACY || OF || EXTMEM || COMPILE_TEST
select NUMA_KEEP_MEMINFO if NUMA_MEMBLKS
default LIBNVDIMM
help
Allows creation of DAX devices on RAM carveouts.
Memory ranges that are manually specified by the
- 'memmap=nn[KMG]!ss[KMG]' kernel command line or defined by dummy
- pmem-region device tree nodes would be managed by this driver as DIMM
- devices with support for dynamic layout of namespaces.
- The driver steals 128K in the end of the memmap range for the
+ 'memmap=nn[KMG]!ss[KMG]' or 'extmem=' kernel command line or defined
+ by dummy pmem-region device tree nodes would be managed by this driver
+ as DIMM devices with support for dynamic layout of namespaces.
+ The driver steals 128K in the end of the range for the
namespace management. This allows supporting up to 509 namespaces
(see 'ndctl create-namespace --help').
- The driver should be force bound to e820_pmem or pmem-region platform
- devices using 'driver_override' device attribute.
+ The driver should be force bound to e820_pmem, extmem, or pmem-region
+ platform devices using 'driver_override' device attribute.
Select N if unsure.
diff --git a/drivers/nvdimm/ramdax.c b/drivers/nvdimm/ramdax.c
index 4efffc3ee5a0..4fb90e8cc018 100644
--- a/drivers/nvdimm/ramdax.c
+++ b/drivers/nvdimm/ramdax.c
@@ -206,7 +206,8 @@ static int ramdax_probe(struct platform_device *pdev)
if (np) {
if (!of_match_node(ramdax_of_matches, np))
return -ENODEV;
- } else if (strcmp(pdev->name, "e820_pmem") != 0) {
+ } else if (strcmp(pdev->name, "extmem") != 0 &&
+ strcmp(pdev->name, "e820_pmem") != 0) {
return -ENODEV;
}
@@ -224,7 +225,7 @@ static int ramdax_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, nvdimm_bus);
- if (np) {
+ if (np || strcmp(pdev->name, "extmem") == 0) {
for (unsigned int i = 0; i < pdev->num_resources; i++) {
if (resource_type(&pdev->resource[i]) != IORESOURCE_MEM)
continue;
@@ -253,6 +254,6 @@ static struct platform_driver ramdax_driver = {
module_platform_driver(ramdax_driver);
-MODULE_DESCRIPTION("NVDIMM support for e820 type-12 memory and OF pmem-region");
+MODULE_DESCRIPTION("NVDIMM support for e820 type-12, OF pmem-region, and extmem");
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Microsoft Corporation");
next prev parent reply other threads:[~2026-12-02 0:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 0:19 [RFC PATCH 00/11] mm: NUMA-aware boot memory carving (extmem) Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 01/11] mm/cma: clamp multi-range search to 4G and honor memblock flags Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 02/11] mm/memblock: factor out multi-range contiguous reservation helper from CMA Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 03/11] x86/mm: add early direct-map unmap helpers for boot carveouts Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 04/11] arm64/mm: support unmapping boot carveouts from the linear map Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 05/11] mm/extmem: add architecture-neutral external memory subsystem Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 06/11] dax/hmem: bind extmem platform devices with per-region alignment Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 07/11] nvdimm/ramdax: manage bus and DIMM allocations with devres Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 08/11] nvdimm/ramdax: harden probe checks and select NUMA_KEEP_MEMINFO Suseendran Bhaskaran
2026-12-02 0:19 ` Suseendran Bhaskaran [this message]
2026-12-02 0:19 ` [RFC PATCH 10/11] x86/kaslr: avoid placing kernel in carvable high memory when extmem= is set Suseendran Bhaskaran
2026-12-02 0:19 ` [RFC PATCH 11/11] mm/extmem: preserve carved regions across KHO kexec Suseendran Bhaskaran
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=20261202001946.1226273-10-suseendranb@google.com \
--to=suseendranb@google.com \
--cc=akpm@linux-foundation.org \
--cc=alison.schofield@intel.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=changyuanl@google.com \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=dave.jiang@intel.com \
--cc=david@kernel.org \
--cc=djbw@kernel.org \
--cc=fvdl@google.com \
--cc=graf@amazon.com \
--cc=hpa@zytor.com \
--cc=iweiny@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=liam@infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=nvdimm@lists.linux.dev \
--cc=osalvador@suse.de \
--cc=pasha.tatashin@soleen.com \
--cc=peterz@infradead.org \
--cc=pratyush@kernel.org \
--cc=rdunlap@infradead.org \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@kernel.org \
--cc=vbabka@kernel.org \
--cc=vishal.l.verma@intel.com \
--cc=will@kernel.org \
--cc=x86@kernel.org \
/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®