cpuid_subleaf_count(9)
π 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-time0xNformat; 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:
cpuid_leaf_0x2(9)for_each_cpuid_0x2_desc(9)cpuid_subleaf(9)cpuid_leaf(9)cpuid_leaf_raw(9)cpuid_subleaf_n(9)cpuid_subleaf_n_raw(9)
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
- 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