__cpuhp_rem...e_cpuslocked(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __cpuhp_rem...e_cpuslocked β€” from the Kernel API Manual, bestie

Okay so this one's from the Kernel API Manual, section 9, and it's lowkey the cleanup crew of CPU hotplug states. Let's get into it 🧚


🌸 NAME

__cpuhp_remove_state_cpuslocked β€” remove the callbacks for a hotplug machine state. Yes, remove. It's giving spring cleaning for your CPU state machine πŸŽ€

✨ SYNOPSIS

void __cpuhp_remove_state_cpuslocked (enum cpuhp_state state , bool invoke );

πŸ’– ARGUMENTS

  • state β€” the state to remove. Like, the actual enum cpuhp_state you want gone from the machine. Pick your target πŸ‘‘
  • invoke β€” if it's true, the teardown function gets invoked for cpus where cpu state >= state. So true means "yes bestie, actually run the teardown", false means "just remove it, no theatrics" πŸ™ˆ

πŸ”₯ DESCRIPTION

Real talk: the caller needs to hold cpus read locked while calling this function. No cap, that's a requirement, not a suggestion πŸ’€

And the teardown callback is currently not allowed to fail. So think about module removal before you commit, fr fr β€” because this thing cannot back out gracefully for you 😭

⚠️ Say it with me: teardown callback = no failing. Plan your module removal accordingly, periodt.

πŸ¦‹ SEE ALSO

Kernel file ./kernel/cpu.c, plus the whole friend group:


🌈 That's the whole vibe. Source: ./kernel, dated October 2026, and the page itself is __cpuhp_rem...e_cpuslocked(9). Stay locked (read locked, specifically), bestie β€” mwah πŸ’…πŸ’œ

πŸ“¦ where this page comes from