setup_per_cpu_areas just prepare a per-cpu area for each
possible cpu, and it doesn't try to start up other possible cpu(s).
The address of a per-cpu area corresponding to this cpu will be
written to its per-cpu-area register , before starting up.
Starting up other non-boot cpu happens in start_secondary function.
Larry
------------------ Original ------------------
From: "Dave Tian"<dave.jing.tian@xxxxxxxxx>;
Date: Sat, Apr 23, 2016 10:02 PM
To: "ÂäºÛ"<losemyheaven@xxxxxx>;
Cc: "kernelnewbies"<kernelnewbies@xxxxxxxxxxxxxxxxx>;
Subject: Re: where is __percpu_seg initialized?
-daveti
> On Apr 23, 2016, at 3:24 AM, ÂäºÛ <losemyheaven@xxxxxx> wrote:
>
> Hi all:
> I knew the kernel implement the per-cpu variable via __percpu_seg. For example on x86 architecture, it's defined as:
>
> #ifdef CONFIG_X86_64
> #define __percpu_seg gs
> #define __percpu_mov_op movq
> #else
> #define __percpu_seg fs
> #define __percpu_mov_op movl
> #endif
>
> But I'm curious where __percpu_seg is initialized?? I fail to find the relative code. Thanks.
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies@xxxxxxxxxxxxxxxxx
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies