topology_get_logical_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… topology_get_logical_id β€” the NAME energy ✨

okay so bestie, this is the manual page for topology_get_logical_id(9) β€” a little kernel API function living its best life in section 9 of the Kernel API Manual. and its whole entire job? retrieve the logical ID at a given topology domain level. that's it. that's the function. iconic behaviour honestly πŸŽ€


✨ SYNOPSIS ✨

int topology_get_logical_id (u32 apicid , enum x86_topology_domains
at_level );

like look at her. two params, returns an int, no drama. we love a low-maintenance signature πŸ’–


🫢 ARGUMENTS 🫢

  • apicid β€” the APIC ID you're trying to look up the logical ID for. that's the one. the input. the main character of this call πŸ”₯
  • at_level β€” the topology domain level you wanna use. pick your level, bestie, and it'll do the thing πŸ’…

🌸 DESCRIPTION 🌸

okay so here's the tea, and it's actually important so listen up πŸ™ˆ

apicid must be a full APIC ID β€” not the normalized variant. like, the real full one. no cap.

but also (and this is the cute part), it's totally valid for all the bits below the domain level specified by at_level to be clear. so both real APIC IDs and backshifted normalized APIC IDs work correctly. yes bestie, both. she's flexible like that βœ¨πŸ¦‹


πŸ‘‘ RETURN πŸ‘‘

  • >= 0 β€” slay, you get the requested logical ID πŸ’–
  • -ERANGE β€” boo, apicid is out of range 😭
  • -ENODEV β€” nope, apicid is not registered πŸ’€
fr fr check your return value before you go assuming things, the negative cases are right there for a reason 🫢

🌈 SEE ALSO 🌈

go read those next, iykwim, they're all part of the same little friend group 🧚⭐


and that's the page!! πŸ“ this one came from ./arch/x86/kernel/cpu, dated October 2026, and it's filed under topology_get_logical_id(9) β€” mwah, go forth and look up those logical IDs responsibly πŸ’œπŸŽ€

πŸ“¦ where this page comes from