cxl_decoder_init(9)
πΈ cxl_decoder_init β the Kernel API Manual, bestie edition πΈ
okay so this is a page from the Kernel API Manual and it's literally about cxl_decoder_init, which is the common decoder setup / initialization vibe check. yes we're doing CXL today, drink some water first π
β¨ NAME β¨
cxl_decoder_init β common decoder setup / initialization. that's it, that's the whole name, no cap π
π¦ SYNOPSIS π¦
int cxl_decoder_init (struct cxl_port *port , struct cxl_decoder *cxld );
look at her. two args, one int return, absolute main character energy π
π ARGUMENTS π
portβ the owning port of this decoder, aka the decoder's home base πcxldβ the common decoder properties that get initialized, the actual glow-up target β¨
π DESCRIPTION π
so a port may contain one or more decoders. not just one, like, one or more, she's flexible πββοΈ and each of those decoders enables some address space for CXL.mem utilization β that's the whole point, giving CXL.mem somewhere to live.
and here's the part where you gotta pay attention: a decoder is expected to be configured by the caller before registering via cxl_decoder_add. so like, do your setup first, then register. not the other way around. order matters, iykyk π
π₯ SEE ALSO π₯
the kernel file ./drivers/cxl/core/port.c, and then this whole friend group:
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)find_cxl_port_by_uport(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)
heads up bestie: configurecxldbefore you hitcxl_decoder_add. the page says the caller is expected to do it, so that's on you π«Ά
and that's the page!! π sourced from ./drivers/cxl/core, dated October 2026, live from the Kernel API Manual β mwah, go configure some decoders, you're gonna slay πβπ
π¦ 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