From: Dave Jiang <dave.jiang@intel.com>
To: linux-cxl@vger.kernel.org
Cc: dan.j.williams@intel.com, ira.weiny@intel.com,
vishal.l.verma@intel.com, alison.schofield@intel.com,
Jonathan.Cameron@huawei.com, dave@stgolabs.net, jgg@nvidia.com,
shiju.jose@huawei.com
Subject: [RFC PATCH 06/13] cxl: Add Get Feature command support
Date: Thu, 18 Jul 2024 14:32:24 -0700 [thread overview]
Message-ID: <20240718213446.1750135-7-dave.jiang@intel.com> (raw)
In-Reply-To: <20240718213446.1750135-1-dave.jiang@intel.com>
Add enumeration of Get Feature mailbox command for the kernel to recognize
the command being passed in from user space.
CXL spec r3.1 8.2.9.6.2 Get Feature (Opcode 0501h)
The feature requested is identified by specific UUID.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
---
drivers/cxl/core/mbox.c | 1 +
drivers/cxl/cxlmem.h | 1 +
include/uapi/linux/cxl_mem.h | 1 +
3 files changed, 3 insertions(+)
diff --git a/drivers/cxl/core/mbox.c b/drivers/cxl/core/mbox.c
index 70e3962ed570..b58b8cc517c9 100644
--- a/drivers/cxl/core/mbox.c
+++ b/drivers/cxl/core/mbox.c
@@ -68,6 +68,7 @@ static struct cxl_mem_command cxl_mem_commands[CXL_MEM_COMMAND_ID_MAX] = {
CXL_CMD(GET_SCAN_MEDIA_CAPS, 0x10, 0x4, 0),
CXL_CMD(GET_TIMESTAMP, 0, 0x8, 0),
CXL_CMD(GET_SUPPORTED_FEATURES, 0x8, CXL_VARIABLE_PAYLOAD, 0),
+ CXL_CMD(GET_FEATURE, 0x15, CXL_VARIABLE_PAYLOAD, 0),
};
/*
diff --git a/drivers/cxl/cxlmem.h b/drivers/cxl/cxlmem.h
index 4d3690aa2f3b..317cb92b0bfb 100644
--- a/drivers/cxl/cxlmem.h
+++ b/drivers/cxl/cxlmem.h
@@ -483,6 +483,7 @@ enum cxl_opcode {
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_IDENTIFY = 0x4000,
CXL_MBOX_OP_GET_PARTITION_INFO = 0x4100,
CXL_MBOX_OP_SET_PARTITION_INFO = 0x4101,
diff --git a/include/uapi/linux/cxl_mem.h b/include/uapi/linux/cxl_mem.h
index bd2535962f70..90dcb9723997 100644
--- a/include/uapi/linux/cxl_mem.h
+++ b/include/uapi/linux/cxl_mem.h
@@ -51,6 +51,7 @@
___C(CLEAR_LOG, "Clear Log"), \
___C(GET_SUP_LOG_SUBLIST, "Get Supported Logs Sub-List"), \
___C(GET_SUPPORTED_FEATURES, "Get Supported Features"), \
+ ___C(GET_FEATURE, "Get Feature"), \
___C(MAX, "invalid / last command")
#define ___C(a, b) CXL_MEM_COMMAND_ID_##a
--
2.45.2
next prev parent reply other threads:[~2024-07-18 21:34 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 21:32 [RFC PATCH 0/13] fwctl/cxl: Add CXL feature commands support via fwctl Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 01/13] cxl: Move mailbox related bits to the same context Dave Jiang
2024-07-19 6:31 ` Alejandro Lucero Palau
2024-07-19 15:47 ` Dave Jiang
2024-07-19 16:07 ` Alejandro Lucero Palau
2024-07-26 17:28 ` Jonathan Cameron
2024-07-18 21:32 ` [RFC PATCH 02/13] cxl: Fix comment regarding cxl_query_cmd() return data Dave Jiang
2024-07-26 17:29 ` Jonathan Cameron
2024-09-24 23:41 ` Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 03/13] cxl: Refactor user ioctl command path from mds to mailbox Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 04/13] cxl: Add Get Supported Features command for kernel usage Dave Jiang
2024-07-26 17:50 ` Jonathan Cameron
2024-09-27 16:22 ` Dave Jiang
2024-08-21 16:05 ` Shiju Jose
2024-08-21 18:10 ` Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 05/13] cxl/test: Add Get Supported Features mailbox command support Dave Jiang
2024-07-18 21:32 ` Dave Jiang [this message]
2024-07-18 21:32 ` [RFC PATCH 07/13] cxl: Add Set Feature " Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 08/13] fwctl/cxl: Add driver for CXL mailbox for handling CXL features commands Dave Jiang
2024-07-22 15:31 ` Jason Gunthorpe
2024-07-22 21:42 ` Dave Jiang
2024-07-26 18:02 ` Jonathan Cameron
2024-09-24 23:44 ` Dave Jiang
2024-09-26 17:37 ` Jason Gunthorpe
2024-09-26 20:26 ` Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 09/13] fwctl/cxl: Add support for get driver information Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 10/13] fwctl/cxl: Add support for fwctl RPC command to enable CXL feature commands Dave Jiang
2024-07-22 15:29 ` Jason Gunthorpe
2024-07-22 22:52 ` Dave Jiang
2024-07-29 11:29 ` Jonathan Cameron
2024-11-13 15:41 ` Dave Jiang
2024-11-19 11:41 ` Jonathan Cameron
2024-07-18 21:32 ` [RFC PATCH 11/13] fwctl/cxl: Add query commands software command for ->fw_rpc() Dave Jiang
2024-07-22 15:24 ` Jason Gunthorpe
2024-07-22 23:23 ` Dave Jiang
2024-08-08 12:56 ` Jason Gunthorpe
2024-07-29 11:48 ` Jonathan Cameron
2024-07-18 21:32 ` [RFC PATCH 12/13] cxl/test: Add Get Feature support to cxl_test Dave Jiang
2024-07-18 21:32 ` [RFC PATCH 13/13] cxl/test: Add Set " Dave Jiang
2024-07-19 6:23 ` [RFC PATCH 0/13] fwctl/cxl: Add CXL feature commands support via fwctl Alejandro Lucero Palau
2024-07-19 15:48 ` Dave Jiang
2024-07-22 15:32 ` Jason Gunthorpe
2024-07-29 12:05 ` Jonathan Cameron
2024-08-06 16:44 ` Dave Jiang
2024-11-13 0:17 ` Dave Jiang
2024-11-19 11:43 ` Jonathan Cameron
2024-11-19 15:58 ` Dave Jiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240718213446.1750135-7-dave.jiang@intel.com \
--to=dave.jiang@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=alison.schofield@intel.com \
--cc=dan.j.williams@intel.com \
--cc=dave@stgolabs.net \
--cc=ira.weiny@intel.com \
--cc=jgg@nvidia.com \
--cc=linux-cxl@vger.kernel.org \
--cc=shiju.jose@huawei.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox