Skip to main content

init_percpu_reg

Function init_percpu_reg 

Source
pub fn init_percpu_reg(cpu_id: usize)
Expand description

Initializes the per-CPU data register for the current CPU.

This function sets the architecture-specific per-CPU register to point to the base address of the per-CPU data area for the given CPU ID.

This should be called on each CPU during boot, after init() or init_in_place() has been called.

§Arguments

  • cpu_id: The CPU ID to use (0-based index).

§Panics

Panics if the per-CPU area base address has not been set.