topology_get_logical_id(9)
π
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,apicidis out of range π-ENODEVβ nope,apicidis not registered π
fr fr check your return value before you go assuming things, the negative cases are right there for a reason π«Ά
π SEE ALSO π
- the kernel file
./arch/x86/kernel/cpu/topology.c topology_register_apic(9)topology_register_boot_apic(9)topology_unit_count(9)topology_hotplug_apic(9)topology_hotunplug_apic(9)topology_apply_cmdline_limits_early(9)
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
- 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