cpuhp_setup_...s_cpuslocked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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, or NULL if you don't need one. no pressure, NULL is a valid lifestyle πŸ’œ
  • teardown β€” your teardown callback function, or NULL if 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:

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