cpuhp_remove_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cpuhp_remove_state(9) β€” Kernel API Manual πŸŽ€

okay so bestie, we're in the cpuhp_remove_state(9) manpage, from the Kernel API Manual β€” yes the whole manual, and yes this page is a baddie. sit down, grab a strawberry πŸ“, and let's talk about taking hotplug state callbacks out.


✨ NAME ✨

cpuhp_remove_state β€” remove hotplug state callbacks and invoke the teardown. like, the full send. you're not just ghosting the callbacks, you're throwing the goodbye party too 🫢


🌸 SYNOPSIS 🌸

void cpuhp_remove_state (enum cpuhp_state state );

no cap, that's the whole signature. short, iconic, does exactly one thing πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • state β€” the state for which the calls are removed. literally the state whose callbacks are getting evicted. everything happens relative to this state, so get it right the first time, iykyk πŸ’€

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea β˜•: cpuhp_remove_state removes the callback functions and invokes the teardown callback on the online cpus which have already reached the state.

Read that again, bestie, because this is the important part β€” it's a two-parter:

  1. removes the callback functions β€” the callbacks are gone, bye bye πŸ‘‹
  2. invokes the teardown callback β€” and then it actually runs the teardown, but only on the online cpus that have already reached the state.

not every cpu. not the offline ones. only the online ones that got there. main character energy for real β€” it only deals with the cpus that are actually in the room 🧚

the vibe check: "remove" + "invoke the teardown" together, in one call. that's the whole point of this function, and it's the difference between this and the _nocalls versions hanging out in SEE ALSO. don't get it twisted πŸ’–


🌈 SEE ALSO 🌈

kernel file ./include/linux/cpuhotplug.h β€” and the whole friend group right here, all of them, every single one:


ngl, the _nocalls ones are right there if you don't want the teardown invoked. peek at the one that matches your vibe before you commit, bestie πŸ™ˆ

and that's the page!! πŸŽ€ this lil beauty lives in ./include/linux, and it's serving October 2026 energy β€” so when you cite it, that's the source and the date, periodt. go forth and remove those states, icon πŸ‘‘βœ¨

πŸ“¦ where this page comes from