Messages in this thread | | | Date | Tue, 27 Jan 2009 13:17:24 +0900 | From | Tejun Heo <> | Subject | Re: 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
| |