diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-05-02 13:27:11 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:11 -0400 |
commit | 4fbb5968810b237e81977f131986b9efd5245368 (patch) | |
tree | e2d67eee96c143da26ccad791b3e1f23c3bcbe03 /include/asm-i386/desc.h | |
parent | 141f9cfe0a948c8fe26e5669364ee62c03ea42e8 (diff) |
[PATCH] i386: cleanup GDT Access
Now we have an explicit per-cpu GDT variable, we don't need to keep the
descriptors around to use them to find the GDT: expose cpu_gdt directly.
We could go further and make load_gdt() pack the descriptor for us, or even
assume it means "load the current cpu's GDT" which is what it always does.
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/asm-i386/desc.h')
-rw-r--r-- | include/asm-i386/desc.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 13f701ea9a8f..4a974064e928 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -18,16 +18,13 @@ struct Xgt_desc_struct { | |||
18 | unsigned short pad; | 18 | unsigned short pad; |
19 | } __attribute__ ((packed)); | 19 | } __attribute__ ((packed)); |
20 | 20 | ||
21 | extern struct Xgt_desc_struct idt_descr; | ||
22 | DECLARE_PER_CPU(struct Xgt_desc_struct, cpu_gdt_descr); | ||
23 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt[GDT_ENTRIES]); | 21 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt[GDT_ENTRIES]); |
24 | extern struct Xgt_desc_struct early_gdt_descr; | ||
25 | |||
26 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) | 22 | static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) |
27 | { | 23 | { |
28 | return (struct desc_struct *)per_cpu(cpu_gdt_descr, cpu).address; | 24 | return per_cpu(cpu_gdt, cpu); |
29 | } | 25 | } |
30 | 26 | ||
27 | extern struct Xgt_desc_struct idt_descr; | ||
31 | extern struct desc_struct idt_table[]; | 28 | extern struct desc_struct idt_table[]; |
32 | extern void set_intr_gate(unsigned int irq, void * addr); | 29 | extern void set_intr_gate(unsigned int irq, void * addr); |
33 | 30 | ||