cxl/uapi: Add warning on CXL command enum
authorIra Weiny <ira.weiny@intel.com>
Fri, 3 Feb 2023 01:04:25 +0000 (17:04 -0800)
committerDan Williams <dan.j.williams@intel.com>
Sat, 11 Feb 2023 01:54:45 +0000 (17:54 -0800)
The CXL command enum is exported to user space and must maintain
backwards compatibility.

Add comment that new defines must be added to the end of the list.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20221222-cxl-misc-v4-2-62f701c1cdd1@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
include/uapi/linux/cxl_mem.h

index c71021a2a9edf5309e3ff1afce7d146142b9ba77..459a3f7f764b7d61d2a1fc4942c3cf102432c4c7 100644 (file)
 #define CXL_MEM_QUERY_COMMANDS _IOR(0xCE, 1, struct cxl_mem_query_commands)
 #define CXL_MEM_SEND_COMMAND _IOWR(0xCE, 2, struct cxl_send_command)
 
+/*
+ * NOTE: New defines must be added to the end of the list to preserve
+ * compatibility because this enum is exported to user space.
+ */
 #define CXL_CMDS                                                          \
        ___C(INVALID, "Invalid Command"),                                 \
        ___C(IDENTIFY, "Identify Command"),                               \