find_acpi_cpu_topology(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… find_acpi_cpu_topology(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so picture this: it's a (9) section page, kernel API manual energy, and the whole thing is about handing you back one (1) unique little number that tells you where a CPU sits in the whole thread/core/cluster/mc_grouping/socket/etc. food chain. she's an icon, she's a lookup function, let's get into it ✨


🌸 SYNOPSIS 🌸

int find_acpi_cpu_topology (unsigned int cpu , int level );

literally the whole signature, no notes πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • cpu β€” the kernel logical CPU number, i.e. which CPU you're asking about, bestie 🫢
  • level β€” the topological level you want a unique ID for β€” the whole point of the call, no cap πŸ‘‘

✨ DESCRIPTION ✨

so what she does is: determine a topology unique ID for each thread / core / cluster / mc_grouping / socket / etc. 🧚 that ID is then your little grouping key β€” peers that match IDs get to be grouped together, fr fr. matching ids = same squad πŸ’–

and here's the important bit about how the search goes: it terminates when either the requested level is found or we hit a root node. that's it, that's the stop condition 🌈

now β€” levels beyond the termination point? they'll return the same unique ID. so don't come for her expecting fresh numbers past the finish line, okay 😭

the unique id for level 0 is the acpi processor id. iconic. everything above level 0 uses a generated value to uniquely identify a topological feature β€” so level 0 gets the real deal, the rest get handcrafted artisanal generated IDs πŸŽ€


πŸ’€ RETURN πŸ’€

  • -ENOENT β€” if the PPTT doesn't exist, or the CPU cannot be found πŸ™ˆ (yes, both of those, same error, that's just how she is)
  • otherwise β€” a value which represents a unique topological feature ⭐

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/acpi/pptt.c β€” and the whole bestie squad, all of them, in order, because we don't do partial lists here πŸ‘‘

ngl that's a lot of siblings, but they all ate and left no crumbs πŸ“

🌟 a lil sign-off 🌟

this page lives in ./drivers/acpi (that's the source/version vibe, bestie), and it was dated October 2026 β€” so yes, this manpage is from the future and she's still serving πŸ’œ

kisses, go group your peers correctly, mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from