[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260109122941.rjbs3in6mxipbfpt@test-PowerEdge-R740xd>
Date: Fri, 9 Jan 2026 17:59:41 +0530
From: Neeraj Kumar <s.neeraj@...sung.com>
To: Jonathan Cameron <jonathan.cameron@...wei.com>
Cc: linux-cxl@...r.kernel.org, nvdimm@...ts.linux.dev,
linux-kernel@...r.kernel.org, gost.dev@...sung.com,
a.manzanares@...sung.com, vishak.g@...sung.com, neeraj.kernel@...il.com,
cpgs@...sung.com
Subject: Re: [PATCH V4 14/17] cxl/pmem_region: Introduce
CONFIG_CXL_PMEM_REGION for core/pmem_region.c
On 17/12/25 03:38PM, Jonathan Cameron wrote:
>On Wed, 19 Nov 2025 13:22:52 +0530
>Neeraj Kumar <s.neeraj@...sung.com> wrote:
>
>> As pmem region label update/delete has hard dependency on libnvdimm.
>> It is therefore put core/pmem_region.c under CONFIG_CXL_PMEM_REGION
>> control. It handles the dependency by selecting CONFIG_LIBNVDIMM
>> if not enabled.
>>
>> Signed-off-by: Neeraj Kumar <s.neeraj@...sung.com>
>
>
>> diff --git a/drivers/cxl/core/core.h b/drivers/cxl/core/core.h
>> index 5ebbc3d3dde5..beeb9b7527b8 100644
>> --- a/drivers/cxl/core/core.h
>> +++ b/drivers/cxl/core/core.h
>> @@ -89,17 +88,23 @@ static inline struct cxl_region *to_cxl_region(struct device *dev)
>> {
>> return NULL;
>> }
>> -static inline int devm_cxl_add_pmem_region(struct cxl_region *cxlr)
>> -{
>> - return 0;
>> -}
>> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
>> index 9798120b208e..408e139718f1 100644
>> --- a/drivers/cxl/core/region.c
>> +++ b/drivers/cxl/core/region.c
>> @@ -3918,6 +3918,8 @@ static int cxl_region_probe(struct device *dev)
>> dev_dbg(&cxlr->dev, "CXL EDAC registration for region_id=%d failed\n",
>> cxlr->id);
>>
>> + if (!IS_ENABLED(CONFIG_CXL_PMEM_REGION))
>> + return -EINVAL;
>> return devm_cxl_add_pmem_region(cxlr);
>
>Why not have the stub return -EINVAL if it never makes sense to call without
>the CONFIG being enabled?
I have removed this config check and handled it in
devm_cxl_add_pmem_region() itself.
Regards,
Neeraj
Powered by blists - more mailing lists