cpuhp_invoke_callback(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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, an enum cpuhp_state. yes, it matters. πŸ™ˆ
  • bringup β€” a bool, and it's True if 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 a struct hlist_node * and it's the one-entry girlie for install/remove situations ✨
  • lastp β€” for multi-instance rollback, remember how far we got. a struct 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 🌈

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