[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877ca57vlb.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Fri, 18 Oct 2024 14:50:56 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Dan Williams <dan.j.williams@...el.com>
Cc: Dave Jiang <dave.jiang@...el.com>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, Gregory Price <gourry@...rry.net>,
Davidlohr Bueso <dave@...olabs.net>, Jonathan Cameron
<jonathan.cameron@...wei.com>, Alison Schofield
<alison.schofield@...el.com>, Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>, Alejandro Lucero <alucerop@....com>,
Ben Cheatham <benjamin.cheatham@....com>
Subject: Re: [PATCH 4/5] cxl: Set type of region to that of the first endpoint
Dan Williams <dan.j.williams@...el.com> writes:
> Huang Ying wrote:
[snip]
>> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
>> index 21b877d8582f..d709738ada61 100644
>> --- a/drivers/cxl/core/region.c
>> +++ b/drivers/cxl/core/region.c
>> @@ -1926,7 +1926,10 @@ static int cxl_region_attach(struct cxl_region *cxlr,
>> return -ENXIO;
>> }
>>
>> - if (cxled->cxld.target_type != cxlr->type) {
>> + /* Set the type of region to that of the first endpoint */
>> + if (cxlr->type == CXL_DECODER_INVALID) {
>> + cxlr->type = cxled->cxld.target_type;
>> + } else if (cxled->cxld.target_type != cxlr->type) {
>
> No, the type of the region is determined by the caller and should be
> gated by the region capability. For type-2 region creation I doubt
> userspace is going to be creating those vs the accelerator so this all
> seems backwards to me.
How do we determine the type of the endpoint? Specify it in type2/type3
device driver?
If so, we will specify the type of both the endpoint and the region in
type2/type3 device driver. Then, why not only specify the type of the
endpoint? The type of region can be determined from the type of the
endpoint.
--
Best Regards,
Huang, Ying
Powered by blists - more mailing lists