X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=include%2Fasm-i386%2Fprocessor.h;h=edfbe46a5e13c8042a1b589ee23f2f2c45918a73;hb=9654640d0af8f2de40ff3807d3695109d3463f54;hp=359f10b54f59ba7c99297dac910b73e4c0406796;hpb=7e23772f414cdbfb2a08aed237d6e926bb1cb728;p=mirror_ubuntu-artful-kernel.git diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 359f10b54f59..edfbe46a5e13 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h @@ -257,6 +257,14 @@ static inline void __mwait(unsigned long eax, unsigned long ecx) : :"a" (eax), "c" (ecx)); } +static inline void __sti_mwait(unsigned long eax, unsigned long ecx) +{ + /* "mwait %eax,%ecx;" */ + asm volatile( + "sti; .byte 0x0f,0x01,0xc9;" + : :"a" (eax), "c" (ecx)); +} + extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); /* from system description table in BIOS. Mostly for MCA use, but @@ -424,7 +432,7 @@ struct thread_struct { .vm86_info = NULL, \ .sysenter_cs = __KERNEL_CS, \ .io_bitmap_ptr = NULL, \ - .gs = __KERNEL_PDA, \ + .fs = __KERNEL_PDA, \ } /* @@ -442,8 +450,8 @@ struct thread_struct { } #define start_thread(regs, new_eip, new_esp) do { \ - __asm__("movl %0,%%fs": :"r" (0)); \ - regs->xgs = 0; \ + __asm__("movl %0,%%gs": :"r" (0)); \ + regs->xfs = 0; \ set_fs(USER_DS); \ regs->xds = __USER_DS; \ regs->xes = __USER_DS; \