On Thu, 29 Jan 2026 16:04:37 -0500 Gregory Price <[email protected]> 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 <[email protected]> > Signed-off-by: Gregory Price <[email protected]> LGTM Reviewed-by: Jonathan Cameron <[email protected]>
