find_acpi_c...evel_from_id(9)
π find_acpi_cache_level_from_id β from the Kernel API Manual (section 9), bestie π
okay so picture this: you're deep in the kernel, you've got nothing but a u32 cache id, and you need to know what level that cache is at. that's the whole gig. this little icon does exactly that. β¨
πΈ SYNOPSIS πΈ
int find_acpi_cache_level_from_id (u32 cache_id );
π¦ ARGUMENTS π¦
cache_idβ theidfield of the cache in question. that's it. that's the whole input. like handing someone your student ID and they somehow know your whole schedule. π
π DESCRIPTION π
so what this does: it figures out the level of the cache identified by cache_id β and it's measured relative to any CPU, which is the slay part. it means you can still look up the property even when the CPUs themselves are offline. no CPUs? no problem, the answer's still there. π«Ά
the level it hands back is lowkey useful for grouping caches that are peers β like, same level, same energy, bestie grouping. π
β οΈ heads up: the PPTT table must be rev 3 or later. no rev 3, no dice. periodt.
π also: if one CPU's L2 is shared with another CPU as L3? this function will return an unpredictable value. not wrong exactly β just unpredictable. which honestly is worse. don't say nobody warned you. π
π₯ RETURN π₯
-ENOENTβ when the PPTT doesn't exist, the revision isn't supported, or the cache simply cannot be found. basically the "girl, i looked everywhere" error. π- otherwise β it returns a value representing the level of the specified cache. π
π SEE ALSO π
here's the whole friend group, and yes they all talk to each other:
- kernel file
./drivers/acpi/pptt.c acpi_pptt_walk_cache(9)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)acpi_pptt_get_cpumask_from_cache_id(9)
and that's the whole page, bestie β go forth and find those cache levels π
this one came out of ./drivers/acpi and it's stamped October 2026 β so if you're reading this, hi from the future, drink some water ππ§
π¦ 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