Linux CXL
 help / color / mirror / Atom feed
* [PATCH] cxl: Restore opcode order in enum cxl_opcode
@ 2025-03-07 18:12 alison.schofield
  2025-03-07 20:01 ` Gregory Price
  0 siblings, 1 reply; 3+ messages in thread
From: alison.schofield @ 2025-03-07 18:12 UTC (permalink / raw)
  To: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
	Vishal Verma, Ira Weiny, Dan Williams
  Cc: linux-cxl

From: Alison Schofield <alison.schofield@intel.com>

The opcodes recently drifted out of order. Restore for readability.

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

This just went out of order in cxl/next w FEATURES. I only noticed
while reviewing Shiju's PERFORM_MAINTENANCE patch, where 0x0600 is
being inserting in the middle. Let's keep this orderly.


 drivers/cxl/cxlmem.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index 3ec6b906371b..f60d96f97500 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -524,9 +524,6 @@ enum cxl_opcode {
 	CXL_MBOX_OP_GET_LOG_CAPS	= 0x0402,
 	CXL_MBOX_OP_CLEAR_LOG           = 0x0403,
 	CXL_MBOX_OP_GET_SUP_LOG_SUBLIST = 0x0405,
-	CXL_MBOX_OP_GET_SUPPORTED_FEATURES	= 0x0500,
-	CXL_MBOX_OP_GET_FEATURE		= 0x0501,
-	CXL_MBOX_OP_SET_FEATURE		= 0x0502,
 	CXL_MBOX_OP_IDENTIFY		= 0x4000,
 	CXL_MBOX_OP_GET_PARTITION_INFO	= 0x4100,
 	CXL_MBOX_OP_SET_PARTITION_INFO	= 0x4101,
@@ -551,6 +548,9 @@ enum cxl_opcode {
 	CXL_MBOX_OP_UNLOCK		= 0x4503,
 	CXL_MBOX_OP_FREEZE_SECURITY	= 0x4504,
 	CXL_MBOX_OP_PASSPHRASE_SECURE_ERASE	= 0x4505,
+	CXL_MBOX_OP_GET_SUPPORTED_FEATURES	= 0x0500,
+	CXL_MBOX_OP_GET_FEATURE		= 0x0501,
+	CXL_MBOX_OP_SET_FEATURE		= 0x0502,
 	CXL_MBOX_OP_MAX			= 0x10000
 };
 

base-commit: 0a14566be090ca51a32ebdd8a8e21678062dac08
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] cxl: Restore opcode order in enum cxl_opcode
  2025-03-07 18:12 [PATCH] cxl: Restore opcode order in enum cxl_opcode alison.schofield
@ 2025-03-07 20:01 ` Gregory Price
  2025-03-07 20:11   ` Alison Schofield
  0 siblings, 1 reply; 3+ messages in thread
From: Gregory Price @ 2025-03-07 20:01 UTC (permalink / raw)
  To: alison.schofield
  Cc: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Vishal Verma,
	Ira Weiny, Dan Williams, linux-cxl

On Fri, Mar 07, 2025 at 10:12:10AM -0800, alison.schofield@intel.com wrote:
>  	CXL_MBOX_OP_GET_LOG_CAPS	= 0x0402,
>  	CXL_MBOX_OP_CLEAR_LOG           = 0x0403,
>  	CXL_MBOX_OP_GET_SUP_LOG_SUBLIST = 0x0405,
> -	CXL_MBOX_OP_GET_SUPPORTED_FEATURES	= 0x0500,
> -	CXL_MBOX_OP_GET_FEATURE		= 0x0501,
> -	CXL_MBOX_OP_SET_FEATURE		= 0x0502,
>  	CXL_MBOX_OP_IDENTIFY		= 0x4000,
>  	CXL_MBOX_OP_GET_PARTITION_INFO	= 0x4100,
>  	CXL_MBOX_OP_SET_PARTITION_INFO	= 0x4101,
> @@ -551,6 +548,9 @@ enum cxl_opcode {
>  	CXL_MBOX_OP_UNLOCK		= 0x4503,
>  	CXL_MBOX_OP_FREEZE_SECURITY	= 0x4504,
>  	CXL_MBOX_OP_PASSPHRASE_SECURE_ERASE	= 0x4505,
> +	CXL_MBOX_OP_GET_SUPPORTED_FEATURES	= 0x0500,
> +	CXL_MBOX_OP_GET_FEATURE		= 0x0501,
> +	CXL_MBOX_OP_SET_FEATURE		= 0x0502,
>  	CXL_MBOX_OP_MAX			= 0x10000
>  };
>  

[04, 05, 45] seems like the right ordering for an enum, is this
based on spec ordering?

~Gregory

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] cxl: Restore opcode order in enum cxl_opcode
  2025-03-07 20:01 ` Gregory Price
@ 2025-03-07 20:11   ` Alison Schofield
  0 siblings, 0 replies; 3+ messages in thread
From: Alison Schofield @ 2025-03-07 20:11 UTC (permalink / raw)
  To: Gregory Price
  Cc: Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Vishal Verma,
	Ira Weiny, Dan Williams, linux-cxl

On Fri, Mar 07, 2025 at 03:01:18PM -0500, Gregory Price wrote:
> On Fri, Mar 07, 2025 at 10:12:10AM -0800, alison.schofield@intel.com wrote:
> >  	CXL_MBOX_OP_GET_LOG_CAPS	= 0x0402,
> >  	CXL_MBOX_OP_CLEAR_LOG           = 0x0403,
> >  	CXL_MBOX_OP_GET_SUP_LOG_SUBLIST = 0x0405,
> > -	CXL_MBOX_OP_GET_SUPPORTED_FEATURES	= 0x0500,
> > -	CXL_MBOX_OP_GET_FEATURE		= 0x0501,
> > -	CXL_MBOX_OP_SET_FEATURE		= 0x0502,
> >  	CXL_MBOX_OP_IDENTIFY		= 0x4000,
> >  	CXL_MBOX_OP_GET_PARTITION_INFO	= 0x4100,
> >  	CXL_MBOX_OP_SET_PARTITION_INFO	= 0x4101,
> > @@ -551,6 +548,9 @@ enum cxl_opcode {
> >  	CXL_MBOX_OP_UNLOCK		= 0x4503,
> >  	CXL_MBOX_OP_FREEZE_SECURITY	= 0x4504,
> >  	CXL_MBOX_OP_PASSPHRASE_SECURE_ERASE	= 0x4505,
> > +	CXL_MBOX_OP_GET_SUPPORTED_FEATURES	= 0x0500,
> > +	CXL_MBOX_OP_GET_FEATURE		= 0x0501,
> > +	CXL_MBOX_OP_SET_FEATURE		= 0x0502,
> >  	CXL_MBOX_OP_MAX			= 0x10000
> >  };
> >  
> 
> [04, 05, 45] seems like the right ordering for an enum, is this
> based on spec ordering?

No - just ignore this. Adjusting my eyeglasses.


> 
> ~Gregory

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-03-07 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-07 18:12 [PATCH] cxl: Restore opcode order in enum cxl_opcode alison.schofield
2025-03-07 20:01 ` Gregory Price
2025-03-07 20:11   ` Alison Schofield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox