STRUCT CPU_OPERATIONS(9)
π struct cpu_operations(9) π
okay so this is the Kernel API Manual page for struct cpu_operations(9), and we're literally about to make CPU hotplug callbacks make sense. bestie, no cap π«Ά
β¨ NAME β¨
struct cpu_operations β callback operations for hotplugging CPUs. π
π SYNOPSIS π
here's the struct exactly as it shows up β yes, even those semicolons after #ifdef and #endif, they're literally in there π
struct cpu_operations {
int (*cpu_start)(unsigned int cpu, struct task_struct *tidle);
#ifdef CONFIG_HOTPLUG_CPU;
void (*cpu_stop)(void);
bool (*cpu_is_stopped)(unsigned int cpu);
#endif;
};
π― Members π―
cpu_startβ boots a cpu into the kernel. iconic behavior, honestly π₯cpu_stopβ makes a cpu leave the kernel. must not fail β like, it is not allowed to fail, periodt π and it's called from the cpu being stopped.cpu_is_stoppedβ ensures a cpu has left the kernel. called from another cpu. vibe check complete π¦
π SEE ALSO π
- Kernel file
./arch/riscv/include/asm/cpu_ops.hβ go read the kernel file bestie, iykyk π
this page is from ./arch/riscv/include/asm and it's dated October 2026. mwah π stay slaying those cpu ops β¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms