diff mbox series

[24/46] tools/testing/cxl: Fix decoder default state

Message ID 165603888091.551046.6312322707378021172.stgit@dwillia2-xfh
State Superseded
Headers show
Series CXL PMEM Region Provisioning | expand

Commit Message

Dan Williams June 24, 2022, 2:48 a.m. UTC
The 'enabled' state is reserved for committed decoders. By default,
cxl_test decoders are uncommitted at init time.

Fixes: 7c7d68db0254 ("tools/testing/cxl: Enumerate mock decoders")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 tools/testing/cxl/test/cxl.c |    1 -
 1 file changed, 1 deletion(-)

Comments

Jonathan Cameron June 29, 2022, 4:22 p.m. UTC | #1
On Thu, 23 Jun 2022 19:48:01 -0700
Dan Williams <dan.j.williams@intel.com> wrote:

> The 'enabled' state is reserved for committed decoders. By default,
> cxl_test decoders are uncommitted at init time.
> 
> Fixes: 7c7d68db0254 ("tools/testing/cxl: Enumerate mock decoders")
> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Whilst sanity checking this I notcie we have
CXL_DECODER_F_MASK but never use it. Might be worth dropping...

For this

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> ---
>  tools/testing/cxl/test/cxl.c |    1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
> index c396f20a57dd..51d517fa62ee 100644
> --- a/tools/testing/cxl/test/cxl.c
> +++ b/tools/testing/cxl/test/cxl.c
> @@ -479,7 +479,6 @@ static int mock_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm)
>  			.end = -1,
>  		};
>  
> -		cxld->flags = CXL_DECODER_F_ENABLE;
>  		cxld->interleave_ways = min_not_zero(target_count, 1);
>  		cxld->interleave_granularity = SZ_4K;
>  		cxld->target_type = CXL_DECODER_EXPANDER;
>
Dan Williams July 10, 2022, 5:33 p.m. UTC | #2
Jonathan Cameron wrote:
> On Thu, 23 Jun 2022 19:48:01 -0700
> Dan Williams <dan.j.williams@intel.com> wrote:
> 
> > The 'enabled' state is reserved for committed decoders. By default,
> > cxl_test decoders are uncommitted at init time.
> > 
> > Fixes: 7c7d68db0254 ("tools/testing/cxl: Enumerate mock decoders")
> > Signed-off-by: Dan Williams <dan.j.williams@intel.com>
> Whilst sanity checking this I notcie we have
> CXL_DECODER_F_MASK but never use it. Might be worth dropping...

Yes, that definition look useless.
diff mbox series

Patch

diff --git a/tools/testing/cxl/test/cxl.c b/tools/testing/cxl/test/cxl.c
index c396f20a57dd..51d517fa62ee 100644
--- a/tools/testing/cxl/test/cxl.c
+++ b/tools/testing/cxl/test/cxl.c
@@ -479,7 +479,6 @@  static int mock_cxl_enumerate_decoders(struct cxl_hdm *cxlhdm)
 			.end = -1,
 		};
 
-		cxld->flags = CXL_DECODER_F_ENABLE;
 		cxld->interleave_ways = min_not_zero(target_count, 1);
 		cxld->interleave_granularity = SZ_4K;
 		cxld->target_type = CXL_DECODER_EXPANDER;