check_acpi_cpu_flag(9)
π check_acpi_cpu_flag(9) β the kernel API manual, bestie edition π
okay so this is a page from the Kernel API Manual, and the star of the show is check_acpi_cpu_flag(9). she's a little function, she answers one question, and she ate. periodt. β¨
πΈ NAME πΈ
check_acpi_cpu_flag β Determine if CPU node has a flag set
like, literally just checking whether a CPU node's got a specific flag turned on. that's the whole vibe check. π
π¦ SYNOPSIS π¦
int check_acpi_cpu_flag (unsigned int cpu , int rev , u32 flag );
three arguments, all passed in, no cap. π«Ά
π ARGUMENTS π
cpuβ Kernel logical CPU number. which CPU are we talking about, bestie? this one. π₯revβ The minimum PPTT revision defining the flag. i.e. the flag only exists from this PPTT revision onward β if the table's too old, it's giving β¨nothingβ¨.flagβ The flag itself. the actual thing you're checking for. iconic.
π DESCRIPTION π
Check the node representing a CPU for a given flag.
that's it. that's the whole description. she's concise, she's efficient, she's main character energy. π you hand her a CPU, a minimum PPTT revision, and a flag, and she goes and looks at the node representing that CPU to see if the flag's set. lowkey obsessed with how simple this is. π
β RETURN β
so here's what you get back β and ngl, the returns are a whole personality:
-ENOENTβ returned if any of these lil situations happen:- can't get the CPU's ACPI Processor UID π
- the PPTT doesn't exist π
- the CPU cannot be found π
- the table revision isn't new enough π
1β any passed flag set. slay, the flag is on. π₯0β flag unset. no flag, no problem. π
bestie pls note: that negative -ENOENT is a real error code, not a count. don't go treating it like a number of flags, i'm begging. π
π SEE ALSO π
the kernel file lives at ./drivers/acpi/pptt.c β that's the home base, iykyk. π
and here's the whole friend group, all in (9):
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)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)
go read them. they're all serving. π§π
and that's the page, bestie!! π«Ά this whole thing ships out of ./drivers/acpi, dated October 2026, and it's filed under check_acpi_cpu_flag(9) β so if you ever forget where you read it, that's the β header β right there. bye bye, go check those flags, mwah ππΈ
π¦ 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