l2x0_cache_size_of_parse(9)
π l2x0_cache_size_of_parse(9) β the Kernel API Manual, bestie edition π
okay so picture this: you're deep in the Kernel API Manual and you stumble onto l2x0_cache_size_of_parse(9). don't panic, i got you. this is the little function that β¨reads cache size parameters from DTβ¨ β yes, that's literally its whole job, no cap. it goes digging through the device tree for your l2 cache deets and hands the numbers back to you. lowkey iconic of it. π
β¨ NAME β¨
l2x0_cache_size_of_parse β read cache size parameters from DT π¦
like, actually. that's it. that's the vibe. it reads the cache size params out of the device tree and doesn't make a whole thing of it. periodt. π
β¨ SYNOPSIS β¨
int l2x0_cache_size_of_parse (const struct device_node *np , u32
*aux_val , u32 *aux_mask , u32 *associativity , u32 max_way_size );
look at all those pointers, bestie π it returns an int, takes a const struct device_node * plus a whole lil squad of u32 * pointers, and one plain u32 for good measure. main character signature energy ngl. π
β¨ ARGUMENTS β¨
npβ the device tree node for the l2 cache πΈ like, the actual node, in the flesh (well, in the tree). this is where it's getting all its info from.aux_valβ pointer to the machine-supplied auxilary register value, and the call augments it β as in, the bits it wants get set to1. π«Ά so your value goes in with some bits already chillin' and comes out with a few more.aux_maskβ pointer to the machine-supplied auxilary register mask, also augmented by the call β but this one's the opposite vibe: the bits get set to0. π©· mask goes in, bits get cleared, everybody's happy.associativityβ the variable where the calculated associativity gets returned π« yes bestie, it does the math and drops the answer right here for you.max_way_sizeβ the maximum size in bytes for the cache ways π₯ that's the ceiling, the limit, the "no way bigger than this" of it all. get it? way? i'll see myself out. π
quick reminder fr fr:aux_valsets bits to1,aux_masksets bits to0. don't mix them up or it's giving chaos. π
β¨ SEE ALSO β¨
- Kernel file
./arch/arm/mm/cache-l2x0.cβ the source, the origin story, the mothership π§ go read it, iykyk π
okay that's the whole page and you ate that, honestly. π much love from the ./arch/arm/mm girlies, October 2026 β catch you in the next manpage, bestie!! πβ¨π
π¦ 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