ia64/xen-unstable

changeset 16423:66a7ff355762

x86: make set_task_gate() x86-32-only since x86-64 doesn't have task gates.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Nov 22 14:16:25 2007 +0000 (2007-11-22)
parents db98e4676d3f
children 5e85709e998b
files xen/arch/x86/traps.c xen/arch/x86/x86_32/traps.c xen/include/asm-x86/desc.h
line diff
     1.1 --- a/xen/arch/x86/traps.c	Thu Nov 22 14:12:47 2007 +0000
     1.2 +++ b/xen/arch/x86/traps.c	Thu Nov 22 14:16:25 2007 +0000
     1.3 @@ -2581,15 +2581,6 @@ void set_system_gate(unsigned int n, voi
     1.4      _set_gate(idt_table+n,14,3,addr);
     1.5  }
     1.6  
     1.7 -void set_task_gate(unsigned int n, unsigned int sel)
     1.8 -{
     1.9 -    idt_table[n].b = 0;
    1.10 -    wmb(); /* disable gate /then/ rewrite */
    1.11 -    idt_table[n].a = sel << 16;
    1.12 -    wmb(); /* rewrite /then/ enable gate */
    1.13 -    idt_table[n].b = 0x8500;
    1.14 -}
    1.15 -
    1.16  void set_tss_desc(unsigned int n, void *addr)
    1.17  {
    1.18      _set_tssldt_desc(
     2.1 --- a/xen/arch/x86/x86_32/traps.c	Thu Nov 22 14:12:47 2007 +0000
     2.2 +++ b/xen/arch/x86/x86_32/traps.c	Thu Nov 22 14:16:25 2007 +0000
     2.3 @@ -258,6 +258,15 @@ unsigned long do_iret(void)
     2.4      return 0;
     2.5  }
     2.6  
     2.7 +static void set_task_gate(unsigned int n, unsigned int sel)
     2.8 +{
     2.9 +    idt_table[n].b = 0;
    2.10 +    wmb(); /* disable gate /then/ rewrite */
    2.11 +    idt_table[n].a = sel << 16;
    2.12 +    wmb(); /* rewrite /then/ enable gate */
    2.13 +    idt_table[n].b = 0x8500;
    2.14 +}
    2.15 +
    2.16  void __devinit subarch_percpu_traps_init(void)
    2.17  {
    2.18      struct tss_struct *tss = &doublefault_tss;
     3.1 --- a/xen/include/asm-x86/desc.h	Thu Nov 22 14:12:47 2007 +0000
     3.2 +++ b/xen/include/asm-x86/desc.h	Thu Nov 22 14:16:25 2007 +0000
     3.3 @@ -214,7 +214,6 @@ extern struct desc_struct compat_gdt_tab
     3.4  
     3.5  extern void set_intr_gate(unsigned int irq, void * addr);
     3.6  extern void set_system_gate(unsigned int n, void *addr);
     3.7 -extern void set_task_gate(unsigned int n, unsigned int sel);
     3.8  extern void set_tss_desc(unsigned int n, void *addr);
     3.9  
    3.10  #endif /* !__ASSEMBLY__ */