Subject: Re: [PATCH v8 22/27] cxl: allow region creation by type2 drivers

From: Jonathan Cameron <[email-masked]>
Date: Tue, 24 Dec 2024 18:01:35 +0000

On Mon, 16 Dec 2024 16:10:37 +0000
<[email-masked]> wrote:

> From: Alejandro Lucero <[email-masked]>
> 
> 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/[email-masked]/
> 
> Signed-off-by: Alejandro Lucero <[email-masked]>
> Signed-off-by: Dan Williams <[email-masked]>

Why does this have Dan's SoB?  Co-developed missing or author
wrong?

> Reviewed-by: Zhi Wang <[email-masked]>

One minor comment inline

Jonathan

> +static struct cxl_region *construct_region_begin(struct cxl_root_decoder *cxlrd,
> +						 struct cxl_endpoint_decoder *cxled)
>  {
>  	struct cxl_memdev *cxlmd = cxled_to_memdev(cxled);
> -	struct cxl_port *port = cxlrd_to_port(cxlrd);
> -	struct range *hpa = &cxled->cxld.hpa_range;
>  	struct cxl_region_params *p;
>  	struct cxl_region *cxlr;
> -	struct resource *res;
> -	int rc;
> +	int err;
>  
>  	do {
>  		cxlr = __create_region(cxlrd, cxled->mode,
> @@ -3400,8 +3421,7 @@ static struct cxl_region *construct_region(struct cxl_root_decoder *cxlrd,
>  	} while (IS_ERR(cxlr) && PTR_ERR(cxlr) == -EBUSY);
>  
>  	if (IS_ERR(cxlr)) {
> -		dev_err(cxlmd->dev.parent,
> -			"%s:%s: %s failed assign region: %ld\n",
> +		dev_err(cxlmd->dev.parent, "%s:%s: %s failed assign region: %ld\n",

Looks accidental unrelated change as I can't spy what is different.

>  			dev_name(&cxlmd->dev), dev_name(&cxled->cxld.dev),
>  			__func__, PTR_ERR(cxlr));