[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <850c92e9-1662-46bc-9df7-15432645093f@amd.com>
Date: Mon, 7 Apr 2025 12:03:59 +0100
From: Alejandro Lucero Palau <alucerop@....com>
To: Jonathan Cameron <Jonathan.Cameron@...wei.com>,
alejandro.lucero-palau@....com
Cc: 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 v12 18/23] cxl: allow region creation by type2 drivers
On 4/4/25 17:45, Jonathan Cameron wrote:
> On Mon, 31 Mar 2025 15:45:50 +0100
> <alejandro.lucero-palau@....com> wrote:
>
>> From: Alejandro Lucero <alucerop@....com>
>>
>> Creating a CXL region requires userspace intervention through the cxl
>> sysfs files. Type2 support should allow accelerator drivers to create
>> such cxl region from kernel code.
>>
>> Adding that functionality and integrating it with current support for
>> memory expanders.
>>
>> Based on https://lore.kernel.org/linux-cxl/168592159835.1948938.1647215579839222774.stgit@dwillia2-xfh.jf.intel.com/
>>
>> Signed-off-by: Alejandro Lucero <alucerop@....com>
>> ---
>> drivers/cxl/core/region.c | 135 +++++++++++++++++++++++++++++++++++---
>> drivers/cxl/port.c | 5 +-
>> include/cxl/cxl.h | 4 ++
>> 3 files changed, 135 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
>> index 892fb799bf46..f2e1d5719a70 100644
>> --- a/drivers/cxl/core/region.c
>> +++ b/drivers/cxl/core/region.c
>> @@ -2310,6 +2310,17 @@ static int cxl_region_detach(struct cxl_endpoint_decoder *cxled)
>> return rc;
>> }
>>
>> +int cxl_accel_region_detach(struct cxl_endpoint_decoder *cxled)
>> +{
>> + int rc;
>> +
>> + guard(rwsem_write)(&cxl_region_rwsem);
>> + cxled->part = -1;
>> + rc = cxl_region_detach(cxled);
>> + return rc;
> ` return cxl_region_detach()
>
> Check for any other cases of this. If we don't clean them up now we'll
> just get patches form those who run scripts to find these and that's
> just noise upstream that I'd rather avoid.
>
I'll do.
Thanks!
>> +}
>> +EXPORT_SYMBOL_NS_GPL(cxl_accel_region_detach, "CXL");
Powered by blists - more mailing lists