cpuhp_invoke_callback(9)
π cpuhp_invoke_callback β like, the whole kernel API manual moment β¨
okay so bestie, buckle up, because this page is literally from the Kernel API Manual and it's about firing off callbacks for a CPU hotplug state. it's giving "behind the scenes of the kernel" energy and honestly? iconic. π
β¨ SYNOPSIS β¨
int cpuhp_invoke_callback (unsigned int cpu , enum cpuhp_state state ,
bool bringup , struct hlist_node *node , struct hlist_node **lastp );
no cap, that's the whole signature. five args, one int coming back at you. π«Ά
πΈ ARGUMENTS πΈ
cpuβ the cpu like, the actual one π β the CPU for which the callback should be invoked. that's the vibe check target, bestie.stateβ the state to do callbacks for. yes, anenum cpuhp_state. yes, it matters. πbringupβ abool, and it'sTrueif the bringup callback should be invoked. so like, are we bringing it up or not, that is the question πnodeβ for multi-instance, do a single entry callback for install/remove. so it's astruct hlist_node *and it's the one-entry girlie for install/remove situations β¨lastpβ for multi-instance rollback, remember how far we got. astruct hlist_node **that's basically the "wait, where were we" bookmark π
π¦ DESCRIPTION π¦
Called from cpu hotplug and from the state register machinery.
that's it. that's the description. she's short, she's mysterious, she's lowkey the main character of ./kernel/cpu.c. periodt. π
β RETURN β
0 on success, or a negative errno code. that's the whole mood. slay. π₯
ok real talk: negative errno means something went sideways, so likeβ¦ check it, bestie. don't just vibe past the return value. π
π SEE ALSO π
- kernel file
./kernel/cpu.c struct cpuhp_cpu_state(9)struct cpuhp_step(9)cpuhp_ap_update_sync_state(9)cpuhp_ap_report_dead(9)cpuhp_ap_sync_alive(9)clear_tasks_mm_cpumask(9)cpu_device_down(9)notify_cpu_starting(9)cpu_device_up(9)bringup_hibernate_cpu(9)__cpuhp_setup_state_cpuslocked(9)__cpuhp_remove_state_cpuslocked(9)
like, read them all, they're all connected, iykyk π
and that's the page! π§ from ./kernel, dated October 2026, and this was cpuhp_invoke_callback(9) β go forth and invoke those callbacks responsibly, bestie, 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