mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 21:56:09 -04:00
[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>
This commit is contained in:
committed by
Andi Kleen
parent
ae1ee11be7
commit
bf50467204
@@ -12,8 +12,6 @@
|
||||
|
||||
#include <asm/mmu.h>
|
||||
|
||||
extern struct desc_struct cpu_gdt_table[GDT_ENTRIES];
|
||||
|
||||
struct Xgt_desc_struct {
|
||||
unsigned short size;
|
||||
unsigned long address __attribute__((packed));
|
||||
|
||||
@@ -743,7 +743,6 @@ extern unsigned long boot_option_idle_override;
|
||||
extern void enable_sep_cpu(void);
|
||||
extern int sysenter_setup(void);
|
||||
|
||||
extern void init_gdt(int cpu, struct task_struct *idle);
|
||||
extern void cpu_set_gdt(int);
|
||||
extern void secondary_cpu_init(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user