summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/desc_defs.h
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-01-30 13:31:12 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:12 +0100
commit010d4f8221cf51a2ab8b037d0149506b397d073f (patch)
tree3e1e1cb1d92cac074fe689291feddb973343941f /include/asm-x86/desc_defs.h
parent7e6ebe1432b04c2980cd030c9f0d1ed480e1fe4d (diff)
x86: introduce gate_desc type.
To account for the differences in gate descriptor in i386 and x86_64 a gate_desc type is introduced. Signed-off-by: Glauber de Oliveira Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86/desc_defs.h')
-rw-r--r--include/asm-x86/desc_defs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/asm-x86/desc_defs.h b/include/asm-x86/desc_defs.h
index de47eb0a23a..9732285116a 100644
--- a/include/asm-x86/desc_defs.h
+++ b/include/asm-x86/desc_defs.h
@@ -39,7 +39,7 @@ enum {
};
// 16byte gate
-struct gate_struct {
+struct gate_struct64 {
u16 offset_low;
u16 segment;
unsigned ist : 3, zero0 : 5, type : 5, dpl : 2, p : 1;
@@ -67,6 +67,12 @@ struct ldttss_desc {
u32 zero1;
} __attribute__((packed));
+#ifdef CONFIG_X86_64
+typedef struct gate_struct64 gate_desc;
+#else
+typedef struct desc_struct gate_desc;
+#endif
+
struct desc_ptr {
unsigned short size;
unsigned long address;