cxl_switch_decoder_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 cxl_switch_decoder_alloc(9) β€” Kernel API Manual, bestie edition 🌸

okay so welcome to the Kernel API Manual page for cxl_switch_decoder_alloc β€” yes the name is a mouthful, no we are not changing it, it's iconic actually πŸ’…


✨ NAME ✨

cxl_switch_decoder_alloc β€” allocate a switch level decoder πŸŽ€


✨ SYNOPSIS ✨

struct cxl_switch_decoder * cxl_switch_decoder_alloc (struct cxl_port
*port , unsigned int nr_targets );

like... that's the whole vibe. two args, one struct pointer back. slay.


✨ ARGUMENTS ✨

  • port β€” the owning CXL switch port of this decoder πŸ‘‘ she's the main character, everything hangs off her.
  • nr_targets β€” the max number of dynamically addressable downstream targets. lowkey the ceiling on how many friends this decoder can have fr fr.

✨ RETURN ✨

You get back a brand new cxl decoder, the kind that's meant to be registered by cxl_decoder_add. πŸ¦‹

It also brings a topology and the HDM Decoder Capability along with it β€” no cap. And heads up bestie, this includes the decoders that sit between Switch Upstream Ports / Switch Downstream Ports and Host Bridges / Root Ports. yes, all of those. the whole friend group πŸ’–


✨ SEE ALSO ✨

Kernel file ./drivers/cxl/core/port.c 🌈 and honestly the entire cxl cinematic universe:

like, read them all. iykyk πŸ’œ


and that's the page!! mwah 🫢 this lil cutie lives in ./drivers/cxl/core, dated October 2026, and answers to cxl_switch_decoder_alloc(9) β€” go off bestie, allocate responsibly βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from