STRUCT CXL_REGION_PARAMS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct cxl_region_params(9) πŸ’…

okay bestie so this is a page from the Kernel API Manual (section 9, kernel API gang 🌸) and it's literally all about struct cxl_region_params β€” the little vibe-holder for region settings ✨


πŸŽ€ NAME πŸŽ€

struct cxl_region_params β€” region settings, that's it, that's the whole thing πŸ’–


✨ SYNOPSIS ✨

struct cxl_region_params {
    enum cxl_config_state state;
    uuid_t uuid;
    int interleave_ways;
    int interleave_granularity;
    struct resource *res;
    struct cxl_endpoint_decoder *targets[CXL_DECODER_MAX_INTERLEAVE];
    int nr_targets;
    resource_size_t cache_size;
 };

no cap, that's the whole struct, copied exactly, i don't play about accuracy 🫢


πŸ¦‹ Members πŸ¦‹

  • state β€” this one lets the driver lockdown any further parameter changes πŸ‘‘ like it's the bouncer at the club, nobody gets in after this
  • uuid β€” the unique id for persistent regions, its literal main character identifier πŸ’«
  • interleave_ways β€” the number of endpoints in the region, i.e. how many besties are sharing the stripe
  • interleave_granularity β€” the capacity each endpoint contributes to a stripe, so like how much each one's bringing to the picnic basket 🧺
  • res β€” the allocated iomem capacity for this region, the actual resources, the bag πŸ’°
  • targets β€” the active ordered targets in the current decoder configuration β€” ordered, okay, the order matters, don't come at me πŸ™ˆ
  • nr_targets β€” number of targets, simply the count, that's it, lowkey the easiest member here
  • cache_size β€” the extended linear cache size if it exists, otherwise zero πŸ“ (yes, zero, not "undefined", not "we'll see" β€” zero)

πŸ’œ Description πŸ’œ

okay so the important bit: state transitions are protected by cxl_rwsem.region πŸ”’

like, if you're touching state, that's the lock, respect the lock, the lock is iconic and you do not cross it periodt πŸ’…


🌈 SEE ALSO 🌈

Kernel file ./drivers/cxl/cxl.h β€” and then the whole extended friend group, fr fr:

  • cxl objects(9)
  • struct cxl_decoder(9)
  • struct cxl_endpoint_decoder(9)
  • struct cxl_switch_decoder(9)
  • struct cxl_rd_ops(9)
  • struct cxl_root_decoder(9)
  • struct cxl_region(9)
  • struct cxl_port(9)
  • struct cxl_root(9)
  • struct cxl_dport(9)
  • struct cxl_ep(9)
  • struct cxl_region_ref(9)
  • struct cxl_endpoint_dvsec_info(9)

bestie reminder πŸ’€: those SEE ALSO names are literal struct names and page refs β€” type them exactly, don't get cute with them, i'm begging πŸ™

aaaand that's the page!! this gem lives in ./drivers/cxl and it's dated October 2026 ⭐ signed, sealed, slayed, and shipped with love from your fave kernel-obsessed bestie πŸŽ€πŸ’–πŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from