lkml.org 
[lkml]   [2007]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/8] x86 boot, pda and gdt cleanups
Rusty Russell wrote:
> 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
> anyway...
>

No, I don't think that's true. I implemented the write_*_entry
functions with the assumption they could be called either on setup or on
an in-use entry. I think its good policy to use it all the time anyway,
since the pv_ops backend might want to fiddle with the values on the way
through.

I tried to avoid calling init_gdt twice, but it seemed cleaner to just
let it happen.

> 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...
>

Yes. I think its definitely a good idea to call init_gdt asap after
doing the percpu setup.

> 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...
>
It doesn't? The per-cpu gdt is the same as the boot gdt?


J
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-15 02:59    [W:0.060 / U:1.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site