cxl_calc_interleave_pos(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ cxl_calc_interleave_pos(9) ✨

okay so bestie, we're in the Kernel API Manual today and this function is literally the main character of interleave math πŸŽ€


🌸 NAME 🌸

cxl_calc_interleave_pos β€” calculate an endpoint position in a region πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int cxl_calc_interleave_pos (struct cxl_endpoint_decoder *cxled , struct
       range *hpa_range );

like, yes, it wraps onto two lines, that's just how it's printed, don't come for me 😭


πŸ“ ARGUMENTS πŸ“

  • cxled β€” the endpoint decoder that's a member of the given region 🫢
  • hpa_range β€” the endpoint's HPA range, already translated ✨

πŸ’– DESCRIPTION πŸ’–

okay so the way this works: the endpoint position gets calculated by traversing the topology from the endpoint all the way up to the root decoder, and iteratively applying this calculation:

position = position * parent_ways + parent_pos;

and position is inferred from switch and root decoder target lists. iykyk πŸ”₯


🌈 RETURN 🌈

  • position >= 0 on success β€” slay πŸ’…
  • -ENXIO on failure β€” πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, no cap 🧚 this came out of ./drivers/cxl/core, dated October 2026 β€” ok bye, go read the source, ily πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from