lkml.org 
[lkml]   [2009]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 13/17] x86-64: Remove pda_init()
From
On Sat, Jan 17, 2009 at 11:32 PM, Tejun Heo <tj@kernel.org> wrote:
> Hello,
>
> Brian Gerst wrote:
>> -void __cpuinit pda_init(int cpu)
>> -{
>> - struct x8664_pda *pda = cpu_pda(cpu);
>> -
>> - /* Setup up data that may be needed in __get_free_pages early */
>> - loadsegment(fs, 0);
>> - loadsegment(gs, 0);
>> -
>> - load_pda_offset(cpu);
>> -}
>
> Simply removing these should work fine as they're also initialized in
> other places earlier but I think they still need to be in cpu_init()
> because...
>
> /*
> * cpu_init() initializes state that is per-CPU. Some data is already
> * initialized (naturally) in the bootstrap process, such as the GDT
> * and IDT. We reload them nevertheless, this function acts as a
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> * 'CPU state barrier', nothing should get across.
> * A lot of state is already set up in PDA init for 64 bit
> */

That comment seems like overkill. It may have been relevant in an
earlier time, but I don't think we need to be so strict now,
especially for things we know are set properly in head_xx.S.

--
Brian Gerst


\
 
 \ /
  Last update: 2009-01-18 06:23    [W:0.108 / U:3.188 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site