Li-Ta Lo ollie@lanl.gov writes:
On Tue, 2004-08-24 at 19:07, Eric W. Biederman wrote:
No quite I put the cpu_info structure at the bottom of the stack, and this function looks it up.
The same idea has been used in the kernel for quite a while.
Basically this allows me to preallocate some per cpu information and to pass that into cpu_initialize from another cpu.
The linux kernel has been doing something similar for quite a while.
Does cpu_info() return different value depends on which CPU it is running ?
Yes. The stack is per cpu and it returns a fixed address from the stack structure.
Are the data structures per CPU or shared between CPUs ?
per-cpu. Which is the point.
Eric