devm_cxl_add_rch_dport(9)
π devm_cxl_add_rch_dport(9) β the kernel API manual, but make it make sense
okay bestie so this page lives in the Kernel API Manual (yes, that manual) and it's all about devm_cxl_add_rch_dport β say that five times fast, I dare you π it's the function that appends RCH downstream port data to a cxl_port. That's the whole vibe. CXL core, RCH downstream ports, devm-managed. Slay.
β¨ SYNOPSIS β¨
struct cxl_dport * devm_cxl_add_rch_dport (struct cxl_port *port ,
struct device *dport_dev , int port_id , resource_size_t rcrb );
that's the signature, copy it exactly, don't come for me π«Ά
π ARGUMENTS π
portβ thecxl_portthat references this dport. like, the port that's claiming this downstream port as its own, iykyk.dport_devβ the firmware or PCI device representing the dport. literally the device telling us "hi, I'm the downstream port π"port_idβ the identifier for this dport in a decoder's target list. that's where it shows up, that's its little name tag.rcrbβ the mandatory location of a Root Complex Register Block. mandatory!! not optional, not "if u feel like it", mandatory π₯
π¦ DESCRIPTION π¦
so the actual description here is, and I quote the source of truth: See CXL 3.0 9.11.8 CXL Devices Attached to an RCH. that's it. that's the lore. go read the spec section, it's giving "the real documentation is the friends we made along the way" ππ
π SEE ALSO π
bestie, the reading list is long and honestly iconic. here's every single one, no skips:
- Kernel file
./drivers/cxl/core/port.c cxl core(9)devm_cxl_add_port(9)devm_cxl_add_dport(9)cxl_add_ep(9)find_cxl_port_by_dport(9)find_cxl_port_by_uport(9)cxl_decoder_init(9)cxl_root_decoder_alloc(9)cxl_switch_decoder_alloc(9)cxl_endpoint_decoder_alloc(9)cxl_decoder_add_locked(9)cxl_decoder_add(9)__cxl_driver_register(9)cxl_endpoint_get_perf_coordinates(9)
like, go off, cross-reference section π go read all of them, fr fr.
ngl this one's short but it's mighty β the key takeaway is:rcrbis mandatory, andport_idshows up in a decoder's target list. don't forget it π
and that's the whole page, bestie π this gem comes out of ./drivers/cxl/core, dated October 2026, and if u ever need to find it again just yell devm_cxl_add_rch_dport(9) into the group chat and someone will pull it up πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms