init_per_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ init_per_cpu(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” today's page is init_per_cpu(9), and it's literally giving "every CPU gets its own little glow-up" energy. no cap. πŸ’–βœ¨


🌸 NAME 🌸

init_per_cpu β€” Handle individual processor initializations.

πŸ¦‹ SYNOPSIS πŸ¦‹

int init_per_cpu (int cpunum );

πŸŽ€ ARGUMENTS πŸŽ€

  • cpunum β€” logical processor number. that's the arg, bestie. 🫢

πŸ’… DESCRIPTION πŸ’…

okay so this function handles initialization for every CPU in the system. not a vibe check for one CPU β€” every CPU. periodt. πŸ‘‘

Here's the whole checklist, and yes we're keeping every single detail:

  • Set "default" CPU width for trap handlers. πŸŽ€
  • Enable FP coprocessor. REVISIT: this could be done in the "code 22" trap handler. (frowands idea β€” that way we know which processes need FP registers saved on the interrupt stack.) NEWS FLASH: wide kernels need FP coprocessor enabled to handle formatted printing of lx for example (double divides I think). 🫢
  • Enable CPU profiling hooks. slay. πŸ”₯

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./arch/parisc/kernel/processor.c, plus init_percpu_prof(9), processor_probe(9), collect_boot_cpu_data(9), and processor_init(9). iykyk β€” those are the next reads, bestie. 🌈


signed off with source/version ./arch/parisc/kernel and date October 2026 β€” init_per_cpu(9) out here with main character energy. πŸ’…πŸ«Ά

πŸ“¦ where this page comes from