acpi_count_levels(9)
β¨ acpi_count_levels(9) β¨
okay so bestie, welcome to the acpi_count_levels page β it lives in the Kernel API Manual and honestly? it's giving "little function, big job" π
π NAME π
acpi_count_levels β given a PPTT table and a CPU node, this one counts the total number of levels and the split cache levels (data/instruction). yes, both. she's multitasking, we love that for her π«Ά
πΈ SYNOPSIS πΈ
int acpi_count_levels (struct acpi_table_header *table_hdr , struct
acpi_pptt_processor *cpu_node , unsigned int *split_levels );
three arguments, returns an int, no drama. iconic behavior ngl β¨
π¦ ARGUMENTS π¦
table_hdrβ pointer to the head of the PPTT table. literally the starting point of the whole vibe check π§cpu_nodeβ the processor node we wish to count caches for. this is the main character of the operation πsplit_levelsβ number of split cache levels (data/instruction) if success. and listen β this can beNULL. yep, she's optional, no cap π
π RETURN π
returns the number of levels. here's the tea though, bestie β how it actually gets there is kinda cute:
given a processor node containing a processing unit, it walks into it and counts how many levels exist solely for it, and then walks up each level until we hit the root node. (it ignores the package level, because it may be possible to have caches that exist across packages β so like, not relevant to this count, we don't claim her π«)
and on the way up? it counts the number of cache levels and the split cache levels (data/instruction) that exist at each level. so it's counting the whole way, both directions. obsessed with the dedication tbh πβ
π₯ SEE ALSO π₯
kernel file ./drivers/acpi/pptt.c β go read her, she's the source of truth π
and the whole friend group π«Ά:
acpi_pptt_walk_cache(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)
and that's the whole page, bestie πβ¨
cute lil sign-off: this one's filed under ./drivers/acpi and stamped October 2026 β so like, future-coded but make it kernel πΈπ go count some levels, you got this 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