Thread (30 messages) 30 messages, 4 authors, 2026-02-05

Re: [PATCH 4/9] drivers/cxl,dax: add dax driver mode selection for dax regions

From: Jonathan Cameron <jonathan.cameron@huawei.com>
Date: 2026-02-02 17:54:24
Also in: linux-cxl, linux-fsdevel, linux-mm, lkml, nvdimm

On Thu, 29 Jan 2026 16:04:37 -0500
Gregory Price [off-list ref] wrote:
CXL regions may wish not to auto-configure their memory as dax kmem,
but the current plumbing defaults all cxl-created dax devices to the
kmem driver.  This exposes them to hotplug policy, even if the user
intends to use the memory as a dax device.

Add plumbing to allow CXL drivers to select whether a DAX region should
default to kmem (DAXDRV_KMEM_TYPE) or device (DAXDRV_DEVICE_TYPE).

Add a 'dax_driver' field to struct cxl_dax_region and update
devm_cxl_add_dax_region() to take a dax_driver_type parameter.

In drivers/dax/cxl.c, the IORESOURCE_DAX_KMEM flag used by dax driver
matching code is now set conditionally based on dax_region->dax_driver.

Exports `enum dax_driver_type` to linux/dax.h for use in the cxl driver.

All current callers pass DAXDRV_KMEM_TYPE for backward compatibility.

Cc: John Groves <redacted>
Signed-off-by: Gregory Price <gourry@gourry.net>
LGTM
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help