aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-05-02 13:27:10 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-05-02 13:27:10 -0400
commitbf50467204b435421d8de33ad080fa46c6f3d50b (patch)
tree87a27c6f23f28d0e7dacee4ac45986e897d244a8 /include
parentae1ee11be77f51cedb6c569887dddc70c163ab6d (diff)
[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>
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/desc.h2
-rw-r--r--include/asm-i386/processor.h1
2 files changed, 0 insertions, 3 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 53c5916687b6..a75ae6b97860 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -12,8 +12,6 @@
12 12
13#include <asm/mmu.h> 13#include <asm/mmu.h>
14 14
15extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];
16
17struct Xgt_desc_struct { 15struct Xgt_desc_struct {
18 unsigned short size; 16 unsigned short size;
19 unsigned long address __attribute__((packed)); 17 unsigned long address __attribute__((packed));
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h
index cd940befef53..b25a2f5b5375 100644
--- a/include/asm-i386/processor.h
+++ b/include/asm-i386/processor.h
@@ -743,7 +743,6 @@ extern unsigned long boot_option_idle_override;
743extern void enable_sep_cpu(void); 743extern void enable_sep_cpu(void);
744extern int sysenter_setup(void); 744extern int sysenter_setup(void);
745 745
746extern void init_gdt(int cpu, struct task_struct *idle);
747extern void cpu_set_gdt(int); 746extern void cpu_set_gdt(int);
748extern void secondary_cpu_init(void); 747extern void secondary_cpu_init(void);
749 748