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
parentx86: removed unused variable (diff)
downloadlinux-010d4f8221cf51a2ab8b037d0149506b397d073f.tar.xz
linux-010d4f8221cf51a2ab8b037d0149506b397d073f.zip
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 de47eb0a23aa..9732285116af 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;