[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1e1a898b-1872-4aa5-9a3e-a593e3f5ad6c@intel.com>
Date: Mon, 28 Jul 2025 09:23:52 -0700
From: Dave Jiang <dave.jiang@...el.com>
To: dan.j.williams@...el.com, alejandro.lucero-palau@....com,
linux-cxl@...r.kernel.org, netdev@...r.kernel.org, edward.cree@....com,
davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com, edumazet@...gle.com
Cc: Alejandro Lucero <alucerop@....com>
Subject: Re: [PATCH v17 04/22] cxl: allow Type2 drivers to map cxl component
regs
On 7/25/25 3:55 PM, dan.j.williams@...el.com wrote:
> alejandro.lucero-palau@ wrote:
>> From: Alejandro Lucero <alucerop@....com>
>>
>> Export cxl core functions for a Type2 driver being able to discover and
>> map the device component registers.
>
> I would squash this with patch5, up to Dave.
I would prefer that. In general I'd prefer to see the enabling code going with where it's being used to see how it gets utilized. It makes reviewing a bit easier. Thanks!
DJ
>
>> Signed-off-by: Alejandro Lucero <alucerop@....com>
>> ---
>> drivers/cxl/core/port.c | 1 +
>> drivers/cxl/cxl.h | 7 -------
>> drivers/cxl/cxlpci.h | 12 ------------
>> include/cxl/cxl.h | 8 ++++++++
>> include/cxl/pci.h | 15 +++++++++++++++
>> 5 files changed, 24 insertions(+), 19 deletions(-)
>>
> [..]
>> diff --git a/include/cxl/cxl.h b/include/cxl/cxl.h
>> index 9c1a82c8af3d..0810c18d7aef 100644
>> --- a/include/cxl/cxl.h
>> +++ b/include/cxl/cxl.h
>> @@ -70,6 +70,10 @@ struct cxl_regs {
>> );
>> };
>>
>> +#define CXL_CM_CAP_CAP_ID_RAS 0x2
>> +#define CXL_CM_CAP_CAP_ID_HDM 0x5
>> +#define CXL_CM_CAP_CAP_HDM_VERSION 1
>> +
>> struct cxl_reg_map {
>> bool valid;
>> int id;
>> @@ -223,4 +227,8 @@ struct cxl_dev_state *_devm_cxl_dev_state_create(struct device *dev,
>> (drv_struct *)_devm_cxl_dev_state_create(parent, type, serial, dvsec, \
>> sizeof(drv_struct), mbox); \
>> })
>> +
>> +int cxl_map_component_regs(const struct cxl_register_map *map,
>> + struct cxl_component_regs *regs,
>> + unsigned long map_mask);
>
> With this function now becoming public it really wants some kdoc, and a
> rename to add devm_ so that readers are not suprised by hidden devres
> behavior behind this API.
>
> It was ok previously because it was private to drivers/cxl/ where
> everything is devres managed.
Powered by blists - more mailing lists