find_cxl_port_by_uport(9)
π find_cxl_port_by_uport(9) π
okay so bestie, welcome to the Kernel API Manual β this is find_cxl_port_by_uport, and she's literally the friend who introduces you to the right port at the party π
β¨ NAME β¨
find_cxl_port_by_uport β finds you a CXL port device companion</> π«Ά (yes, companion. it's giving matchmaker.)
πΈ SYNOPSIS πΈ
struct cxl_port * find_cxl_port_by_uport (struct device *uport_dev );
that's it. one arg. she's low maintenance π
π¦ ARGUMENTS π¦
uport_devβ the device that acts as a switch</> or endpoint</> in the CXL hierarchy. like, that's her whole job description fr fr.
π DESCRIPTION π
so here's the tea π: in the case of endpoint ports, recall that port->uport_dev points to a 'struct cxl_memdev' device. so the uport_dev argument is the parent device of the
(yeah bestie the original sentence just trails off like that at "of the" β not me, i'm just reporting what the page says π)
and the actual mechanic, no cap: the function takes a device reference on the port device. which means β and this is the important part, do NOT skip it β the caller should do a put_device when done. π«Ά
β οΈ for real though: reference held β you owe a put_device. that's the contract. don't be that person who leaves a reference dangling, it's not cute π
π SEE ALSO π
Kernel file ./drivers/cxl/core/port.c
then the whole squad, in order π
cxl core(9)devm_cxl_add_port(9)devm_cxl_add_dport(9)devm_cxl_add_rch_dport(9)cxl_add_ep(9)find_cxl_port_by_dport(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)
and that's the whole page, bestie!! π§β¨ this iconic little number lives in ./drivers/cxl/core, dated October 2026, and it's filed under find_cxl_port_by_uport(9) β go forth and put_device, ily, mwah ππ
π¦ 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