cpuhp_state_add_instance(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ cpuhp_state_add_instance ✨

okay bestie, welcome to the Kernel API Manual β€” today's main character is cpuhp_state_add_instance, and honestly? she's giving "I just plugged a new instance into a CPU hotplug state and then went and told everyone about it." πŸŽ€


🌸 NAME 🌸

cpuhp_state_add_instance β€” Add an instance for a state and invoke startup callback.

like, that's literally her whole job. no notes. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int cpuhp_state_add_instance (enum cpuhp_state state , struct hlist_node *node );

returns an int, takes two things, that's it, we love a low-maintenance icon. ✨


πŸ’– ARGUMENTS πŸ’–

  • state β€” the state for which the instance is installed. yes queen, tell us which state we're doing this for. πŸ‘‘
  • node β€” the node for this individual state. one node, one instance, one vibe check. 🫢

πŸ”₯ DESCRIPTION πŸ”₯

so what actually happens? cpuhp_state_add_instance installs the instance for the state, and then it invokes the registered startup callback on the online cpus which have already reached that state. fr fr, she doesn't just sit there looking pretty β€” she also pings every cpu that's already past the finish line so nobody's left out. πŸ’œ

⚠️ okay this part matters, bestie: the state must have been earlier marked as multi-instance by cpuhp_setup_state_multi. if you skipped that step, congratulations, you're in undefined territory β€” do not pass go, do not collect $200. 😭

🌈 SEE ALSO 🌈

the whole friend group, gathered for the group chat πŸ’¬ β€” and yeah, it's a long one, but every single one is here, no gatekeeping:


aaaand that's the page!! πŸ’…βœ¨ this lil baddie lives in ./include/linux, wears a Kernel API Manual label, and was last seen slaying in October 2026. mwah, go add those instances bestie πŸ’–πŸ¦‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from