Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'cxl-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl

Pull cxl fixes from Vishal Verma:

- Update MAINTAINERS for Ben's email

- Fix cleanup of port devices on failure to probe driver

- Fix endianness in get/set LSA mailbox command structures

- Fix memregion_free() fallback definition

- Fix missing variable payload checks in CXL cmd size validation

* tag 'cxl-fixes-for-5.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl:
cxl/mbox: Fix missing variable payload checks in cmd size validation
memregion: Fix memregion_free() fallback definition
cxl/mbox: Use __le32 in get,set_lsa mailbox structures
cxl/core: Use is_endpoint_decoder
cxl: Fix cleanup of port devices on failure to probe driver.
MAINTAINERS: Update Ben's email address

+25 -14
+3
.mailmap
··· 64 64 Bart Van Assche <bvanassche@acm.org> <bart.vanassche@wdc.com> 65 65 Ben Gardner <bgardner@wabtec.com> 66 66 Ben M Cahill <ben.m.cahill@intel.com> 67 + Ben Widawsky <bwidawsk@kernel.org> <ben@bwidawsk.net> 68 + Ben Widawsky <bwidawsk@kernel.org> <ben.widawsky@intel.com> 69 + Ben Widawsky <bwidawsk@kernel.org> <benjamin.widawsky@intel.com> 67 70 Björn Steinbrink <B.Steinbrink@gmx.de> 68 71 Björn Töpel <bjorn@kernel.org> <bjorn.topel@gmail.com> 69 72 Björn Töpel <bjorn@kernel.org> <bjorn.topel@intel.com>
+1 -1
MAINTAINERS
··· 5101 5101 M: Alison Schofield <alison.schofield@intel.com> 5102 5102 M: Vishal Verma <vishal.l.verma@intel.com> 5103 5103 M: Ira Weiny <ira.weiny@intel.com> 5104 - M: Ben Widawsky <ben.widawsky@intel.com> 5104 + M: Ben Widawsky <bwidawsk@kernel.org> 5105 5105 M: Dan Williams <dan.j.williams@intel.com> 5106 5106 L: linux-cxl@vger.kernel.org 5107 5107 S: Maintained
+1 -1
drivers/cxl/core/hdm.c
··· 197 197 else 198 198 cxld->target_type = CXL_DECODER_ACCELERATOR; 199 199 200 - if (is_cxl_endpoint(to_cxl_port(cxld->dev.parent))) 200 + if (is_endpoint_decoder(&cxld->dev)) 201 201 return 0; 202 202 203 203 target_list.value =
+4 -2
drivers/cxl/core/mbox.c
··· 355 355 return -EBUSY; 356 356 357 357 /* Check the input buffer is the expected size */ 358 - if (info->size_in != send_cmd->in.size) 358 + if ((info->size_in != CXL_VARIABLE_PAYLOAD) && 359 + (info->size_in != send_cmd->in.size)) 359 360 return -ENOMEM; 360 361 361 362 /* Check the output buffer is at least large enough */ 362 - if (send_cmd->out.size < info->size_out) 363 + if ((info->size_out != CXL_VARIABLE_PAYLOAD) && 364 + (send_cmd->out.size < info->size_out)) 363 365 return -ENOMEM; 364 366 365 367 *mem_cmd = (struct cxl_mem_command) {
+1 -1
drivers/cxl/core/port.c
··· 272 272 .groups = cxl_decoder_root_attribute_groups, 273 273 }; 274 274 275 - static bool is_endpoint_decoder(struct device *dev) 275 + bool is_endpoint_decoder(struct device *dev) 276 276 { 277 277 return dev->type == &cxl_decoder_endpoint_type; 278 278 }
+1
drivers/cxl/cxl.h
··· 340 340 341 341 struct cxl_decoder *to_cxl_decoder(struct device *dev); 342 342 bool is_root_decoder(struct device *dev); 343 + bool is_endpoint_decoder(struct device *dev); 343 344 bool is_cxl_decoder(struct device *dev); 344 345 struct cxl_decoder *cxl_root_decoder_alloc(struct cxl_port *port, 345 346 unsigned int nr_targets);
+4 -4
drivers/cxl/cxlmem.h
··· 300 300 } __packed; 301 301 302 302 struct cxl_mbox_get_lsa { 303 - u32 offset; 304 - u32 length; 303 + __le32 offset; 304 + __le32 length; 305 305 } __packed; 306 306 307 307 struct cxl_mbox_set_lsa { 308 - u32 offset; 309 - u32 reserved; 308 + __le32 offset; 309 + __le32 reserved; 310 310 u8 data[]; 311 311 } __packed; 312 312
+6 -1
drivers/cxl/mem.c
··· 29 29 { 30 30 struct cxl_dev_state *cxlds = cxlmd->cxlds; 31 31 struct cxl_port *endpoint; 32 + int rc; 32 33 33 34 endpoint = devm_cxl_add_port(&parent_port->dev, &cxlmd->dev, 34 35 cxlds->component_reg_phys, parent_port); ··· 38 37 39 38 dev_dbg(&cxlmd->dev, "add: %s\n", dev_name(&endpoint->dev)); 40 39 40 + rc = cxl_endpoint_autoremove(cxlmd, endpoint); 41 + if (rc) 42 + return rc; 43 + 41 44 if (!endpoint->dev.driver) { 42 45 dev_err(&cxlmd->dev, "%s failed probe\n", 43 46 dev_name(&endpoint->dev)); 44 47 return -ENXIO; 45 48 } 46 49 47 - return cxl_endpoint_autoremove(cxlmd, endpoint); 50 + return 0; 48 51 } 49 52 50 53 static void enable_suspend(void *data)
+3 -3
drivers/cxl/pmem.c
··· 108 108 return -EINVAL; 109 109 110 110 get_lsa = (struct cxl_mbox_get_lsa) { 111 - .offset = cmd->in_offset, 112 - .length = cmd->in_length, 111 + .offset = cpu_to_le32(cmd->in_offset), 112 + .length = cpu_to_le32(cmd->in_length), 113 113 }; 114 114 115 115 rc = cxl_mbox_send_cmd(cxlds, CXL_MBOX_OP_GET_LSA, &get_lsa, ··· 139 139 return -ENOMEM; 140 140 141 141 *set_lsa = (struct cxl_mbox_set_lsa) { 142 - .offset = cmd->in_offset, 142 + .offset = cpu_to_le32(cmd->in_offset), 143 143 }; 144 144 memcpy(set_lsa->data, cmd->in_buf, cmd->in_length); 145 145
+1 -1
include/linux/memregion.h
··· 16 16 { 17 17 return -ENOMEM; 18 18 } 19 - void memregion_free(int id) 19 + static inline void memregion_free(int id) 20 20 { 21 21 } 22 22 #endif