STRUCT CXL_MEMDEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct cxl_memdev β€” Kernel API Manual ✨

πŸ’– NAME πŸ’–

okay so struct cxl_memdev is literally the CXL bus object representing a Type-3 Memory Device β€” that’s the whole name vibe, bestie. πŸ’…


✨ SYNOPSIS ✨

struct cxl_memdev {
    struct device dev;
    struct cdev cdev;
    struct cxl_dev_state *cxlds;
    struct work_struct detach_work;
    struct cxl_nvdimm_bridge *cxl_nvb;
    struct cxl_nvdimm *cxl_nvd;
    struct cxl_port *endpoint;
    const struct cxl_memdev_attach *attach;
    int id;
    int depth;
    u8 scrub_cycle;
    int scrub_region_id;
    struct cxl_mem_err_rec *err_rec_array;
 };

🧚 Members 🧚

  • dev β€” the driver core device object, iconic.
  • cdev β€” the char dev core object for ioctl operations. yep, ioctl business.
  • cxlds β€” the device state backing this device.
  • detach_work β€” work item for when an active memdev lost a port in its ancestry. 😭
  • cxl_nvb β€” coordinates removal of cxl_nvd if present.
  • cxl_nvd β€” optional bridge to an nvdimm if the device supports pmem.
  • endpoint β€” connection to the CXL port topology for this memory device.
  • attach β€” means the creator of this memdev depends on CXL link attach to operate.
  • id β€” id number of this memdev instance. periodt.
  • depth β€” endpoint port depth.
  • scrub_cycle β€” current scrub cycle set for this device.
  • scrub_region_id β€” id number of a backed region (if any) for which the current scrub cycle is set.
  • err_rec_array β€” list of xarrarys to store the memdev error records, so you can check whether the attributes for a memory repair operation are from the current boot. πŸ”₯

🌈 SEE ALSO 🌈

Kernel file ./drivers/cxl/cxlmem.h β€” go peek at struct cxl_attach_region(9), struct cxl_event_state(9), struct cxl_poison_state(9), struct cxl_fw_state(9), struct cxl_security_state(9), struct cxl_memdev_state(9), struct cxl_mem_command(9), and struct cxl_hdm(9). πŸ¦‹


πŸ’– signed off from source/version ./drivers/cxl, dated October 2026, all about struct cxl_memdev(9) β€” byeee! πŸ’–

πŸ“¦ where this page comes from