Stop using extra underscores on asm and volatiles, that is just silly. Also, make lgdt/lidt/sgdt/sldt explicitly "l". Index: linux-2.6.13/include/asm-i386/desc.h =================================================================== --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-08 17:10:49.000000000 -0700 +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-08 17:15:46.000000000 -0700 @@ -31,18 +31,18 @@ extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; -#define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) -#define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) +#define load_TR_desc() asm volatile("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) +#define load_LDT_desc() asm volatile("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) -#define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr)) -#define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr)) -#define load_tr(tr) __asm__ __volatile("ltr %0"::"mr" (tr)) -#define load_ldt(ldt) __asm__ __volatile("lldt %0"::"mr" (ldt)) - -#define store_gdt(dtr) __asm__ ("sgdt %0":"=m" (*dtr)) -#define store_idt(dtr) __asm__ ("sidt %0":"=m" (*dtr)) -#define store_tr(tr) __asm__ ("str %0":"=mr" (tr)) -#define store_ldt(ldt) __asm__ ("sldt %0":"=mr" (ldt)) +#define load_gdt(dtr) asm volatile("lgdtl %0"::"m" (*dtr)) +#define load_idt(dtr) asm volatile("lidtl %0"::"m" (*dtr)) +#define load_tr(tr) asm volatile("ltr %0"::"mr" (tr)) +#define load_ldt(ldt) asm volatile("lldt %0"::"mr" (ldt)) + +#define store_gdt(dtr) asm ("sgdtl %0":"=m" (*dtr)) +#define store_idt(dtr) asm ("sidtl %0":"=m" (*dtr)) +#define store_tr(tr) asm ("str %0":"=mr" (tr)) +#define store_ldt(ldt) asm ("sldt %0":"=mr" (ldt)) /* * This is the ldt that every process will get unless we need @@ -52,7 +52,7 @@ extern void set_intr_gate(unsigned int irq, void * addr); #define _set_tssldt_desc(n,addr,limit,type) \ -__asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ +asm volatile ("movw %w3,0(%2)\n\t" \ "movw %w1,2(%2)\n\t" \ "rorl $16,%1\n\t" \ "movb %b1,4(%2)\n\t" \