[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6e10b16-d8a1-4206-ab99-b957dc3b1239@amd.com>
Date: Wed, 24 Sep 2025 09:36:05 +0100
From: Alejandro Lucero Palau <alucerop@....com>
To: "Cheatham, Benjamin" <benjamin.cheatham@....com>,
alejandro.lucero-palau@....com
Cc: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-cxl@...r.kernel.org, netdev@...r.kernel.org, dan.j.williams@...el.com,
edward.cree@....com, davem@...emloft.net, kuba@...nel.org,
pabeni@...hat.com, edumazet@...gle.com, dave.jiang@...el.com
Subject: Re: [PATCH v18 04/20] cxl: allow Type2 drivers to map cxl component
regs
On 9/22/25 22:08, Cheatham, Benjamin wrote:
> On 9/18/2025 4:17 AM, alejandro.lucero-palau@....com wrote:
>> From: Alejandro Lucero <alucerop@....com>
>>
>> Export cxl core functions for a Type2 driver being able to discover and
>> map the device component registers.
>>
>> Use it in sfc driver cxl initialization.
>>
>> Signed-off-by: Alejandro Lucero <alucerop@....com>
>> Reviewed-by: Dan Williams <dan.j.williams@...el.com>
>> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
>> ---
> [snip]
>
>> diff --git a/include/cxl/cxl.h b/include/cxl/cxl.h
>> index 13d448686189..3b9c8cb187a3 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,20 @@ 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); \
>> })
>> +
>> +/**
>> + * cxl_map_component_regs - map cxl component registers
>> + *
>> + *
>> + * @map: cxl register map to update with the mappings
>> + * @regs: cxl component registers to work with
>> + * @map_mask: cxl component regs to map
>> + *
>> + * Returns integer: success (0) or error (-ENOMEM)
>> + *
>> + * Made public for Type2 driver support.
>> + */
> Nits: Probably don't need the return code description and I'd prefer
> "Public for Type2 driver support" instead (don't need to know that
> it used to be private imo).
If I recall it right, Dan suggested this explicit mention of becoming
public.
> Either way:
> Reviewed-by: Ben Cheatham <benjamin.cheatham@....com>
>
Thanks!
Powered by blists - more mailing lists