cpuhp_setup_...s_cpuslocked(9)
πΈ cpuhp_setup_state_nocalls_cpuslocked β Kernel API Manual β¨
okay bestie, sit down, hydrate, and let me tell you about cpuhp_setup_state_nocalls_cpuslocked from the Kernel API Manual. this one is lowkey niche but highkey important, and yes, the name is a mouthful. we're getting through it together π«Ά
π NAME
cpuhp_setup_state_nocalls_cpuslocked β the one that sets up hotplug state callbacks without invoking the @startup callback, and it has to come from a region where cpus_read_lock() is held. callbacks. yes the original says "callbacks" twice, she's just like that π
β¨ SYNOPSIS
int cpuhp_setup_state_nocalls_cpuslocked (enum cpuhp_state state , const
char *name , int (*startup)(unsigned int cpu) , int (*teardown)(unsigned
int cpu) );
that's the whole signature, copy it exactly, do not freestyle it, i'm begging π
π ARGUMENTS
stateβ the state you're installing these calls for. this is the "where" of it all, main character energy fr.nameβ the name of the callback. just a name, but make it a good one iykyk β¨startupβ your startup callback function, orNULLif you don't need one. no pressure,NULLis a valid lifestyle πteardownβ your teardown callback function, orNULLif not required. same deal, optional icon behavior π
π DESCRIPTION
so this is the same as cpuhp_setup_state_nocallsβ¦ except!! it must be invoked from within a region where cpus_read_lock is held. that's the whole bit. that's the vibe check. π₯
β οΈ like genuinely though β must. this is a requirement, not a suggestion, not a cute optional extra. if you're not inside a cpus_read_lock() held region, you're doing it wrong and the kernel is not gonna be nice about it π
π SEE ALSO
kernel file ./include/linux/cpuhotplug.h β and the whole friend group, no cap:
cpuhp_setup_state(9)cpuhp_setup_state_cpuslocked(9)cpuhp_setup_state_nocalls(9)cpuhp_setup_state_multi(9)cpuhp_state_add_instance(9)cpuhp_state_add_instance_nocalls(9)cpuhp_state_add_instance_nocalls_cpuslocked(9)cpuhp_remove_state(9)cpuhp_remove_state_nocalls(9)cpuhp_remove_state_nocalls_cpuslocked(9)cpuhp_remove_multi_state(9)cpuhp_state_remove_instance(9)cpuhp_state_remove_instance_nocalls(9)
like i said. a whole squad π§
and that's the tea, bestie π this page lives over in ./include/linux and it was last touched in October 2026 β so if you're reading this, hi from the future, mwah π slay, go hold that cpus_read_lock() responsibly, and remember: nocalls means nocalls. periodt. π
π¦ 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