Re: Where is the __per_cpu_offset array initialized??

2018-03-11 Thread 落痕
Hi Laurent,


Thanks for your help.
But I'm still not sure how it is implemented.
I'll continue to do some research on the issue, and post my answer if I can.


Thanks
Larry




-- Original --
From:  "Laurent Navet"<laurent.na...@gmail.com>;
Date:  Sat, Mar 10, 2018 09:45 PM
To:  "落痕"<losemyhea...@foxmail.com>;
Cc:  "kernelnewbies"<kernelnewbies@kernelnewbies.org>; 
Subject:  Re: Where is the __per_cpu_offset array initialized??



Hi Larry,

> Does anyone can tell me where the array __per_cpu_offset is initialized on
> x86_64 arch,
> I remembered it was initialized in function setup_per_cpu_areas,
> but it seems that it is not the case on x86-64 arch.

It seems your memory is right and code is shared with x86.
https://elixir.bootlin.com/linux/latest/source/arch/x86/kernel/setup_percpu.c#L29

Laurent.
-- 
« On ne résout pas un problème avec les modes de pensée qui l’ont engendré. »
« You cannot solve a problem with the same thinking that created it. »___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


Re: Where is the __per_cpu_offset array initialized??

2018-03-10 Thread Laurent Navet
Hi Larry,

> Does anyone can tell me where the array __per_cpu_offset is initialized on
> x86_64 arch,
> I remembered it was initialized in function setup_per_cpu_areas,
> but it seems that it is not the case on x86-64 arch.

It seems your memory is right and code is shared with x86.
https://elixir.bootlin.com/linux/latest/source/arch/x86/kernel/setup_percpu.c#L29

Laurent.
-- 
« On ne résout pas un problème avec les modes de pensée qui l’ont engendré. »
« You cannot solve a problem with the same thinking that created it. »

___
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies