cxl/core: Rename functions that handle mbox commands
[email protected]
maintainerPATCH 1/1 cxl/core: Rename functions that handle mbox commands
From: Alison Schofield <[email protected]>
Mailbox commands are sent to the hardware either on behalf of userspace (IOCTLs) or by internal kernel users. Update the naming scheme to delineate the IOCTL versus internal pathways and to more accurately reflect the work each function performs.
IOCTL pathway functions:cxl_ioctl_query() prev: cxl_query_cmd()cxl_ioctl_send() prev: cxl_send_cmd()cxl_ioctl_send_checks() prev: cxl_validate_cmd_from_user()cxl_ioctl_send_to_kbuf() prev: handle_mailbox_cmd_from_user()
Internal pathway functions:cxl_internal_cmd_send() prev: cxl_mbox_send_cmd()cxl_pci_mbox_send() prev: cxl_pci_mbox_send() (no change)
---
Dan - I can rebase on top of cxl/preview next week if that is preferable. Let me know. Meanwhile, let's see how folks like the new names.
drivers/cxl/core/core.h | 6 ++--- drivers/cxl/core/mbox.c | 55 +++++++++++++++++++-------------------- drivers/cxl/core/memdev.c | 4 +-- drivers/cxl/cxlmem.h | 4 +-- drivers/cxl/pmem.c | 11 ++++---- 5 files changed, 40 insertions(+), 40 deletions(-)
drivers/cxl/core/core.h +3 -3
@@ -15,9 +15,9 @@ extern struct device_attribute dev_attr_delete_region;struct cxl_send_command ;struct cxl_mem_query_commands ; -int cxl_query_cmd (struct cxl_memdev *cxlmd, -struct cxl_mem_query_commands __user *q); -int cxl_send_cmd (struct cxl_memdev *cxlmd,struct cxl_send_command __user *s); +int cxl_ioctl_query (struct cxl_memdev *cxlmd, +struct cxl_mem_query_commands __user *q); +int cxl_ioctl_send (struct cxl_memdev *cxlmd,struct cxl_send_command __user *s);void __iomem *devm_cxl_iomap_block (struct device *dev,resource_size_t addr,resource_size_t length);
drivers/cxl/core/mbox.c +27 -28
143 lines not on this page · raw message
drivers/cxl/core/memdev.c +2 -2
@@ -268,9 +268,9 @@ static long __cxl_memdev_ioctl(struct cxl_memdev *cxlmd, unsigned int cmd, {switch (cmd) {case CXL_MEM_QUERY_COMMANDS : -return cxl_query_cmd (cxlmd, (void __user *)arg); +return cxl_ioctl_query (cxlmd, (void __user *)arg);case CXL_MEM_SEND_COMMAND : -return cxl_send_cmd (cxlmd, (void __user *)arg); +return cxl_ioctl_send (cxlmd, (void __user *)arg);default :return -ENOTTY ; }
drivers/cxl/cxlmem.h +2 -2
@@ -296,8 +296,8 @@ struct cxl_mem_command {#define CXL_CMD_FLAG_FORCE_ENABLE BIT(0) }; -int cxl_mbox_send_cmd (struct cxl_dev_state *cxlds,u16 opcode,void *in, -size_t in_size,void *out,size_t out_size); +int cxl_internal_cmd_send (struct cxl_dev_state *cxlds,u16 opcode,void *in, +size_t in_size,void *out,size_t out_size);int cxl_dev_state_identify (struct cxl_dev_state *cxlds);int cxl_enumerate_cmds (struct cxl_dev_state *cxlds);int cxl_mem_create_range_info (struct cxl_dev_state *cxlds);
drivers/cxl/pmem.c +6 -5
@@ -112,8 +112,9 @@ static int cxl_pmem_get_config_data(struct cxl_dev_state *cxlds, .length = cmd->in_length, }; - rc =cxl_mbox_send_cmd (cxlds,CXL_MBOX_OP_GET_LSA , &get_lsa, -sizeof (get_lsa), cmd->out_buf, cmd->in_length); + rc =cxl_internal_cmd_send (cxlds,CXL_MBOX_OP_GET_LSA , &get_lsa, +sizeof (get_lsa), cmd->out_buf, + cmd->in_length); cmd->status =0 ;return rc;
@@ -143,9 +144,9 @@ static int cxl_pmem_set_config_data(struct cxl_dev_state *cxlds, };memcpy (set_lsa->data, cmd->in_buf, cmd->in_length); - rc =cxl_mbox_send_cmd (cxlds,CXL_MBOX_OP_SET_LSA , set_lsa, -struct_size (set_lsa, data, cmd->in_length), -NULL ,0 ); + rc =cxl_internal_cmd_send (cxlds,CXL_MBOX_OP_SET_LSA , set_lsa, +struct_size (set_lsa, data, cmd->in_length), +NULL ,0 );/* * Set "firmware" status (4-packed bytes at the end of the input
base-commit: 9b688fc651b9d2b633e8d959454670aba1c39162
prerequisite-patch-id: 2b66d88f7526f26eb5fb1a42721d3fbde4da20ad
prerequisite-patch-id: cfd4e0a4c852002789432c11abbebfa8b21616a3
prerequisite-patch-id: dbf2fd54ad4926ccd3b1910a534dba7c01c85af6
prerequisite-patch-id: e875aafbd5c11ca5abdba3e4a81122fd034007a6
prerequisite-patch-id: 5dfa246306ae578c294eafb19381658d54497137
prerequisite-patch-id: 0339fd1db77bf0c090ce0aac9481fab439b205c5
prerequisite-patch-id: b4fefc6fb780e7b1cd830f6702012f61f88f5496
prerequisite-patch-id: 74d6bf0328e6452120751b69e84aabca3fecdd0a
prerequisite-patch-id: ece44797d2d18194a9d34b93bba88e5358ffe782
Signature · 1 line
2.31.1