diff mbox series

[4/5] cxl/region: Stop initializing interleave granularity

Message ID 165853777484.2430596.3423921169034844397.stgit@dwillia2-xfh.jf.intel.com
State Superseded
Headers show
Series CXL Region Provisioning Fixes | expand

Commit Message

Dan Williams July 23, 2022, 12:56 a.m. UTC
In preparation for a patch that validates that the region ways setting
is compatible with the granularity setting, the initial granularity
setting needs to start at zero to indicate "unset".

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/cxl/core/region.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Alison Schofield Aug. 1, 2022, 7:41 p.m. UTC | #1
On Fri, Jul 22, 2022 at 05:56:14PM -0700, Dan Williams wrote:
> In preparation for a patch that validates that the region ways setting
> is compatible with the granularity setting, the initial granularity
> setting needs to start at zero to indicate "unset".
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>

Reviewed-by: Alison Schofield <alison.schofield@intel.com>

> ---
>  drivers/cxl/core/region.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index df35d3c475a0..05b6212e6399 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -1524,7 +1524,6 @@ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
>  					      enum cxl_decoder_type type)
>  {
>  	struct cxl_port *port = to_cxl_port(cxlrd->cxlsd.cxld.dev.parent);
> -	struct cxl_decoder *cxld = &cxlrd->cxlsd.cxld;
>  	struct cxl_region_params *p;
>  	struct cxl_region *cxlr;
>  	struct device *dev;
> @@ -1536,7 +1535,6 @@ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
>  	p = &cxlr->params;
>  	cxlr->mode = mode;
>  	cxlr->type = type;
> -	p->interleave_granularity = cxld->interleave_granularity;
>  
>  	dev = &cxlr->dev;
>  	rc = dev_set_name(dev, "region%d", id);
>
Verma, Vishal L Aug. 1, 2022, 7:47 p.m. UTC | #2
On Fri, 2022-07-22 at 17:56 -0700, Dan Williams wrote:
> In preparation for a patch that validates that the region ways setting
> is compatible with the granularity setting, the initial granularity
> setting needs to start at zero to indicate "unset".
> 
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> ---
>  drivers/cxl/core/region.c |    2 --
>  1 file changed, 2 deletions(-)

Looks good, 

Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>

> 
> diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
> index df35d3c475a0..05b6212e6399 100644
> --- a/drivers/cxl/core/region.c
> +++ b/drivers/cxl/core/region.c
> @@ -1524,7 +1524,6 @@ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
>                                               enum cxl_decoder_type type)
>  {
>         struct cxl_port *port = to_cxl_port(cxlrd->cxlsd.cxld.dev.parent);
> -       struct cxl_decoder *cxld = &cxlrd->cxlsd.cxld;
>         struct cxl_region_params *p;
>         struct cxl_region *cxlr;
>         struct device *dev;
> @@ -1536,7 +1535,6 @@ static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
>         p = &cxlr->params;
>         cxlr->mode = mode;
>         cxlr->type = type;
> -       p->interleave_granularity = cxld->interleave_granularity;
>  
>         dev = &cxlr->dev;
>         rc = dev_set_name(dev, "region%d", id);
>
diff mbox series

Patch

diff --git a/drivers/cxl/core/region.c b/drivers/cxl/core/region.c
index df35d3c475a0..05b6212e6399 100644
--- a/drivers/cxl/core/region.c
+++ b/drivers/cxl/core/region.c
@@ -1524,7 +1524,6 @@  static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
 					      enum cxl_decoder_type type)
 {
 	struct cxl_port *port = to_cxl_port(cxlrd->cxlsd.cxld.dev.parent);
-	struct cxl_decoder *cxld = &cxlrd->cxlsd.cxld;
 	struct cxl_region_params *p;
 	struct cxl_region *cxlr;
 	struct device *dev;
@@ -1536,7 +1535,6 @@  static struct cxl_region *devm_cxl_add_region(struct cxl_root_decoder *cxlrd,
 	p = &cxlr->params;
 	cxlr->mode = mode;
 	cxlr->type = type;
-	p->interleave_granularity = cxld->interleave_granularity;
 
 	dev = &cxlr->dev;
 	rc = dev_set_name(dev, "region%d", id);