Re: [PATCH v4 3/9] dax/hmem: Gate Soft Reserved deferral on DEV_DAX_CXL

Jonathan Cameron
2025-12-17T12:07:52Z

On Tue, 2 Dec 2025 16:32:24 -0700
Dave Jiang <dave.jiang@intel.com> wrote:

> On 11/19/25 8:19 PM, Smita Koralahalli wrote:
> > From: Dan Williams <dan.j.williams@intel.com>
> >
> > Replace IS_ENABLED(CONFIG_CXL_REGION) with IS_ENABLED(CONFIG_DEV_DAX_CXL)
> > so that HMEM only defers Soft Reserved ranges when CXL DAX support is
> > enabled. This makes the coordination between HMEM and the CXL stack more
> > precise and prevents deferral in unrelated CXL configurations.
> >
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> > Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@amd.com>
>
> Reviewed-by: Dave Jiang <dave.jiang@intel.com>> ---

Something odd happened with that tag from Dave so that might need manual
application if you use b4 or similar.

This seems sensible to me.
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>

> > drivers/dax/hmem/hmem.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/dax/hmem/hmem.c b/drivers/dax/hmem/hmem.c
> > index 02e79c7adf75..c2c110b194e5 100644
> > --- a/drivers/dax/hmem/hmem.c
> > +++ b/drivers/dax/hmem/hmem.c
> > @@ -66,7 +66,7 @@ static int hmem_register_device(struct device *host, int target_nid,
> > long id;
> > int rc;
> >
> > - if (IS_ENABLED(CONFIG_CXL_REGION) &&
> > + if (IS_ENABLED(CONFIG_DEV_DAX_CXL) &&
> > region_intersects(res->start, resource_size(res), IORESOURCE_MEM,
> > IORES_DESC_CXL) != REGION_DISJOINT) {
> > dev_dbg(host, "deferring range to CXL: %pr\n", res);
>
>