[lkml]   [2007]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 0/8] x86 boot, pda and gdt cleanups
    On Tue, 2007-03-13 at 13:48 -0700, Jeremy Fitzhardinge wrote:
    > * init_gdt should always use write_gdt_entry when touching the gdt;
    > if it doesn't and it ends up touching an already-installed gdt
    > under Xen, it will get a write fault. This happens because
    > init_gdt ends up getting called twice in SMP (see below).

    Hmm, this invalidated my assumption that write_gdt_entry is always a
    write to this cpu's active gdt. Better fix is not to call it twice

    > * init_gdt should always be called before bringing up the cpu,
    > rather than by the cpu itself (and therefore, cpu_init() shouldn't
    > call it). Obviously the the boot cpu is an exception.

    Makes sense.

    > * secondary_cpu_init stops being necessary.


    > * On SMP, init_gdt can get called twice: first time in
    > smp_prepare_boot_cpu, and a second time in trap_init. On UP,
    > trap_init is the only caller.

    Getting rid of the call in smp_prepare_boot_cpu currently works, but
    it's fragile: __get_cpu_var(x) && per_cpu(x, smp_processor_id()) will
    differ, and changes made to __get_cpu_var(x) will vanish...

    Fortunately, UP doesn't have to call init_gdt at all, so I think it's
    better to place it in smp_prepare_boot_cpu only and then clean up the UP
    code. I'll try now...


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-03-15 00:59    [W:0.019 / U:77.772 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site