lkml.org 
[lkml]   [2009]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: unified percpu stuff
Hello,

Jeremy Fitzhardinge wrote:
> I'm really pleased to see the unified percpu stuff in the kernel, but
> unfortunately its breaking Xen at the moment.
> It looks like this is just a matter of initializing %gs properly in
> xen_start_kernel. Is there any problem with me doing a load_gs_base(0)
> somewhere early in xen_start_kernel (arch/x86/xen/enlighten.c)?

No, not at all. Patches welcome. :-)

> Is the initial percpu are and offset for cpu0 all set up? Do I need
> to make it #ifdef CONFIG_SMP?
>
> Do I need to do anything for 32-bit? (I haven't tested that yet.)

The current tj-percpu[1] contains Brian's commit which consolidates
load_gs_base() into switch_to_new_gdt(), so you'll either need to call
it instead or call wrmsrl() or loadsegment() directly if that doesn't
fit the bill (but I think it will).

The initial offset is different between 32 and 64. Please take a look
at BOOT_PERCPU_OFFSET definition in setup_percpu.c.

Thanks.

--
tejun

[1] git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git tj-percpu


\
 
 \ /
  Last update: 2009-01-27 05:19    [W:0.090 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site