[PATCH] i386: Use per-cpu GDT immediately upon boot
Now we are no longer dynamically allocating the GDT, we don't need the "cpu_gdt_table" at all: we can switch straight from "boot_gdt_table" to the per-cpu GDT. This means initializing the cpu_gdt array in C. The boot CPU uses the per-cpu var directly, then in smp_prepare_cpus() it switches to the per-cpu copy just allocated. For secondary CPUs, the early_gdt_descr is set to point directly to their per-cpu copy. For UP the code is very simple: it keeps using the "per-cpu" GDT as per SMP, but we never have to move. Signed-off-by:Rusty Russell <rusty@rustcorp.com.au> Signed-off-by:
Andi Kleen <ak@suse.de> Cc: Andi Kleen <ak@suse.de> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
Showing
- arch/i386/kernel/cpu/common.c 27 additions, 45 deletionsarch/i386/kernel/cpu/common.c
- arch/i386/kernel/head.S 1 addition, 54 deletionsarch/i386/kernel/head.S
- arch/i386/kernel/smpboot.c 47 additions, 12 deletionsarch/i386/kernel/smpboot.c
- arch/i386/mach-voyager/voyager_smp.c 0 additions, 6 deletionsarch/i386/mach-voyager/voyager_smp.c
- include/asm-i386/desc.h 0 additions, 2 deletionsinclude/asm-i386/desc.h
- include/asm-i386/processor.h 0 additions, 1 deletioninclude/asm-i386/processor.h
Loading
Please register or sign in to comment