cpu_pm_enter(9)
β¨ cpu_pm_enter(9) β like, the CPU low-power entry notifier bestie β¨
okay so real talk, this one is from the Kernel API Manual and it's genuinely iconic in a "the whole system stays alive because of me" way π
πΈ NAME πΈ
cpu_pm_enter β the CPU low power entry notifier. yes that's her job title, and she's obsessed with it π
π¦ SYNOPSIS π¦
int cpu_pm_enter (void );
π ARGUMENTS π
voidβ no arguments. zero. none. she takes nothing and still delivers, main character energy fr fr π
π DESCRIPTION π
So basically cpu_pm_enter notifies all the listeners that a single CPU is entering a low power state β and heads up, that state may cause some blocks in the same power domain as the cpu to reset. not a drill, just how it is π«Ά
β οΈ You must call it on the affected CPU, and you must have interrupts disabled. not optional, not a suggestion, that's the whole vibe check.
The platform is responsible for making sure cpu_pm_enter is not called twice on the same CPU before cpu_pm_exit is called. like, one entry, one exit, take turns, be normal about it π
The drivers that get notified can include the VFP co-processor, the interrupt controller and its PM extensions, and local CPU timers context save/restore β all of which shouldn't be interrupted. that's the receipts for why interrupts have to be off. no cap. if you interrupt them it's giving chaos π₯
And the return conditions are the same as __raw_notifier_call_chain. same rules, same energy, iykyk β¨
π SEE ALSO π
- Kernel file
./kernel/cpu_pm.c cpu_pm_register_notifier(9)cpu_pm_unregister_notifier(9)cpu_pm_exit(9)β her other half, the exit to this entry, go read it πcpu_cluster_pm_enter(9)cpu_cluster_pm_exit(9)
those are the siblings, the whole friend group honestly π§
later bestie!! this page lives in ./kernel and it's stamped October 2026 β catch you on the next power state, 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