STRUCT CPUHP_STEP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct cpuhp_step(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… we're looking at struct cpuhp_step(9) and honestly? it's giving main character energy in the CPU hotplug world. 🫢


🌸 NAME 🌸

struct cpuhp_step β€” the Hotplug state machine step ✨ lowkey the little building block that makes the whole hotplug dance work, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

struct cpuhp_step {
    const char              *name;
    union {
      int (*single)(unsigned int cpu);
      int (*multi)(unsigned int cpu, struct hlist_node *node);
    } startup;
    union {
      int (*single)(unsigned int cpu);
      int (*multi)(unsigned int cpu, struct hlist_node *node);
    } teardown;
    bool cant_stop;
    bool multi_instance;
 };

like, that's the whole vibe right there ⬆️ copy it exactly, don't come for me πŸ™ˆ


πŸŽ€ Members πŸŽ€

  • name β€” the name of the step, literally its whole identity πŸͺͺ
  • startup β€” the startup function of the step, aka what it does when things spin up πŸ”₯
  • teardown β€” the teardown function</teardown> of the step, aka the goodbye routine when things wind down πŸ’€
  • cant_stop β€” a bool that says bringup/teardown can't be stopped at this step πŸ›‘ like, no take-backsies, periodt
  • multi_instance β€” a bool meaning the state has multiple instances which get added afterwards πŸ‘‘ (yes, plural, she's multifaceted)
πŸ’‘ quick vibe check: startup and teardown are each a union of a single and a multi function pointer β€” single takes (unsigned int cpu), multi takes (unsigned int cpu, struct hlist_node *node). iykyk 🧚

⭐ SEE ALSO ⭐

go bestie, go read these too, they're all icons fr fr:


and that's the tea πŸ“ this lil page lives under ./kernel, dated October 2026, and it's part of the Kernel API Manual β€” slay, go hotplug some CPUs responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from