aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386/desc.h
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2007-05-02 13:27:15 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-05-02 13:27:15 -0400
commit7a61d35d4b4056e7711031202da7605e052f4137 (patch)
tree4b21e0d541d0a189c2f9f16f53eb6489f07c5a84 /include/asm-i386/desc.h
parent39b7ee06859b07ca5fd4fabb44c4600316532574 (diff)
[PATCH] i386: Page-align the GDT
Xen wants a dedicated page for the GDT. I believe VMI likes it too. lguest, KVM and native don't care. Simple transformation to page-aligned "struct gdt_page". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Diffstat (limited to 'include/asm-i386/desc.h')
-rw-r--r--include/asm-i386/desc.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h
index 4a974064e928..c547403f341d 100644
--- a/include/asm-i386/desc.h
+++ b/include/asm-i386/desc.h
@@ -18,10 +18,15 @@ struct Xgt_desc_struct {
18 unsigned short pad; 18 unsigned short pad;
19} __attribute__ ((packed)); 19} __attribute__ ((packed));
20 20
21DECLARE_PER_CPU(struct desc_struct, cpu_gdt[GDT_ENTRIES]); 21struct gdt_page
22{
23 struct desc_struct gdt[GDT_ENTRIES];
24} __attribute__((aligned(PAGE_SIZE)));
25DECLARE_PER_CPU(struct gdt_page, gdt_page);
26
22static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) 27static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu)
23{ 28{
24 return per_cpu(cpu_gdt, cpu); 29 return per_cpu(gdt_page, cpu).gdt;
25} 30}
26 31
27extern struct Xgt_desc_struct idt_descr; 32extern struct Xgt_desc_struct idt_descr;