cpuid_subleaf_count(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, meet cpuid_subleaf_count β€” the lil' function that tells you the Number of filled subleaves for @_leaf. literally just counting subleaves for you, no cap πŸŽ€

So this page is from the Kernel API Manual β€” yes, the kernel's own hot-girl manual, keep that in mind, iykyk 🧚


✨ SYNOPSIS ✨

cpuid_subleaf_count (_cpuinfo , _leaf );

that's it. that's the whole vibe. πŸ¦‹


🫢 ARGUMENTS 🫢

  • _cpuinfo β€” your CPU capability structure reference, type 'struct cpuinfo_x86'. it's giving "here's the cpu lore, go read it" 🌸
  • _leaf β€” the CPUID leaf, and it has to be in compile-time 0xN format; e.g. 0x4, 0x8000001d. periodt ✨

πŸ’– DESCRIPTION πŸ’–

okay so what it does: it returns the number of subleaves that the CPUID parser filled in for _leaf. simple. iconic. obsessed. πŸ”₯

now the tea β˜• β€” _leaf must have a subleaf range. no range, no count, that's the rule ngl. leaves that do have a subleaf range are the ones with an '_n' type suffix, and they're all listed at <asm/cpuid/types.h> using the CPUID_LEAF_N macro. so like, if you're looking for them, that's where they live πŸ’€

lowkey important: no subleaf range = this call isn't for you, bestie. check the '_n' suffix first πŸŽ€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./arch/x86/include/asm/cpuid/api.h β€” and the whole squad:

go read all of them. they ate. 🌈


and that's the whole page, bestie!! shoutout to the source <hotpink>./arch/x86/include/asm/cpuid</hotpink>, dated October 2026 β€” that's the version + date combo, mwah πŸ’‹ and obviously the page you just read is cpuid_subleaf_count(9) itself, main character energy only πŸ‘‘πŸ’œ slay, go count some subleaves fr fr πŸ“

πŸ“¦ where this page comes from