acpi_pptt_walk_cache(9)
π acpi_pptt_walk_cache β Kernel API Manual, section 9 π
okay so bestie, this page is acpi_pptt_walk_cache(9) and it's literally about digging through the PPTT table until you find the exact cache level you're looking for. it's giving "detective but make it firmware" πβ¨ no cap.
β¨ NAME β¨
acpi_pptt_walk_cache β attempt to find the requested acpi_pptt_cache, that's it, that's the whole vibe π«Ά
π¦ SYNOPSIS π¦
unsigned int acpi_pptt_walk_cache (struct acpi_table_header *table_hdr ,
unsigned int local_level , unsigned int *split_levels , struct
acpi_subtable_header *res , struct acpi_pptt_cache **found , unsigned
int level , int type );
look at all those parameters, main character energy fr fr π
πΈ ARGUMENTS πΈ
table_hdrβ pointer to the head of the PPTT table. like, the very top, the entrance, the VIP door πͺlocal_levelβ theresyou passed in reflects this cache level. so it's telling you where you already are, bestie πsplit_levelsβ number of split cache levels (data/instruction). so like, when the caches get divided by vibe πresβ the cache resource in the PPTT we want to walk. our little starting point π§foundβ returns a pointer to the requested level if it's found. emphasis on if, hun πlevelβ the requested cache level. the one we're hunting for π₯typeβ the requested cache type. gotta match, no substitutes πlevelandtypetogether are the whole personality test, honestly π
π DESCRIPTION π
attempt to find a given cache level, while counting the max number of cache levels for the cache node. two jobs, one function, she's multitasking, we love to see it β¨
given a ppdt resource β okay so given a pptt resource β verify that it is a cache node first (vibe check β
), then walk down each level of caches, counting how many levels are found as well as checking the cache type (icache, dcache, unified). if a level & type match, then we set found, and continue the search. yes, we keep going, we don't stop at the first hit, that's the plot twist π€
once the entire cache branch has been walked, return its max depth. that's the whole journey, start to finish, no shortcuts π
β RETURN β
the cache structure and the level we terminated with. two things, one return, iconic behavior honestly π«Ά
π SEE ALSO π
kernel file ./drivers/acpi/pptt.c, plus a whole friend group of functions:
acpi_count_levels(9)acpi_pptt_leaf_node(9)acpi_find_processor_node(9)update_cache_properties(9)topology_get_acpi_cpu_tag(9)check_acpi_cpu_flag(9)acpi_get_cache_info(9)cache_setup_acpi(9)acpi_pptt_cpu_is_thread(9)find_acpi_cpu_topology(9)find_acpi_cpu_topology_package(9)find_acpi_cpu_topology_cluster(9)find_acpi_cpu_topology_hetero_id(9)acpi_pptt_get_child_cpus(9)acpi_pptt_get_cpus_from_container(9)find_acpi_cache_level_from_id(9)acpi_pptt_get_cpumask_from_cache_id(9)
ngl bestie, go read ./drivers/acpi/pptt.c if you want the real lore, this page is just the trailer π¬
and that's the whole page!! π this came from ./drivers/acpi, dated October 2026, and it's acpi_pptt_walk_cache(9) from the Kernel API Manual β slay, go read your caches, ily, bye ππ¦β¨
π¦ 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