diff options
author | Glauber de Oliveira Costa <gcosta@redhat.com> | 2008-01-30 13:31:12 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 13:31:12 +0100 |
commit | 6b68f01baa810e9f63fbf39e9d5c3ef1d94a966f (patch) | |
tree | dc7f50673d72677d24dbe9ac8217b832f8d5cb02 /include/asm-x86/desc_32.h | |
parent | 6842ef0e85a9cc1295f3ef933a230f863b01eb0f (diff) | |
download | kernel-crypto-6b68f01baa810e9f63fbf39e9d5c3ef1d94a966f.tar.gz kernel-crypto-6b68f01baa810e9f63fbf39e9d5c3ef1d94a966f.tar.xz kernel-crypto-6b68f01baa810e9f63fbf39e9d5c3ef1d94a966f.zip |
x86: unify struct desc_ptr
This patch unifies struct desc_ptr between i386 and x86_64.
They can be expressed in the exact same way in C code, only
having to change the name of one of them. As Xgt_desc_struct
is ugly and big, this is the one that goes away.
There's also a padding field in i386, but it is not really
needed in the C structure definition.
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_32.h')
-rw-r--r-- | include/asm-x86/desc_32.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/include/asm-x86/desc_32.h b/include/asm-x86/desc_32.h index c547403f341..bc5ca345346 100644 --- a/include/asm-x86/desc_32.h +++ b/include/asm-x86/desc_32.h @@ -12,12 +12,6 @@ #include <asm/mmu.h> -struct Xgt_desc_struct { - unsigned short size; - unsigned long address __attribute__((packed)); - unsigned short pad; -} __attribute__ ((packed)); - struct gdt_page { struct desc_struct gdt[GDT_ENTRIES]; @@ -29,7 +23,7 @@ static inline struct desc_struct *get_cpu_gdt_table(unsigned int cpu) return per_cpu(gdt_page, cpu).gdt; } -extern struct Xgt_desc_struct idt_descr; +extern struct desc_ptr idt_descr; extern struct desc_struct idt_table[]; extern void set_intr_gate(unsigned int irq, void * addr); @@ -107,22 +101,22 @@ static inline void native_load_tr_desc(void) asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)); } -static inline void native_load_gdt(const struct Xgt_desc_struct *dtr) +static inline void native_load_gdt(const struct desc_ptr *dtr) { asm volatile("lgdt %0"::"m" (*dtr)); } -static inline void native_load_idt(const struct Xgt_desc_struct *dtr) +static inline void native_load_idt(const struct desc_ptr *dtr) { asm volatile("lidt %0"::"m" (*dtr)); } -static inline void native_store_gdt(struct Xgt_desc_struct *dtr) +static inline void native_store_gdt(struct desc_ptr *dtr) { asm ("sgdt %0":"=m" (*dtr)); } -static inline void native_store_idt(struct Xgt_desc_struct *dtr) +static inline void native_store_idt(struct desc_ptr *dtr) { asm ("sidt %0":"=m" (*dtr)); } |