diff options
Diffstat (limited to 'include/asm-i386/processor.h')
-rw-r--r-- | include/asm-i386/processor.h | 14 |
1 files changed, 11 insertions, 3 deletions
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) | |||
257 | : :"a" (eax), "c" (ecx)); | 257 | : :"a" (eax), "c" (ecx)); |
258 | } | 258 | } |
259 | 259 | ||
260 | static inline void __sti_mwait(unsigned long eax, unsigned long ecx) | ||
261 | { | ||
262 | /* "mwait %eax,%ecx;" */ | ||
263 | asm volatile( | ||
264 | "sti; .byte 0x0f,0x01,0xc9;" | ||
265 | : :"a" (eax), "c" (ecx)); | ||
266 | } | ||
267 | |||
260 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); | 268 | extern void mwait_idle_with_hints(unsigned long eax, unsigned long ecx); |
261 | 269 | ||
262 | /* from system description table in BIOS. Mostly for MCA use, but | 270 | /* from system description table in BIOS. Mostly for MCA use, but |
@@ -424,7 +432,7 @@ struct thread_struct { | |||
424 | .vm86_info = NULL, \ | 432 | .vm86_info = NULL, \ |
425 | .sysenter_cs = __KERNEL_CS, \ | 433 | .sysenter_cs = __KERNEL_CS, \ |
426 | .io_bitmap_ptr = NULL, \ | 434 | .io_bitmap_ptr = NULL, \ |
427 | .gs = __KERNEL_PDA, \ | 435 | .fs = __KERNEL_PDA, \ |
428 | } | 436 | } |
429 | 437 | ||
430 | /* | 438 | /* |
@@ -442,8 +450,8 @@ struct thread_struct { | |||
442 | } | 450 | } |
443 | 451 | ||
444 | #define start_thread(regs, new_eip, new_esp) do { \ | 452 | #define start_thread(regs, new_eip, new_esp) do { \ |
445 | __asm__("movl %0,%%fs": :"r" (0)); \ | 453 | __asm__("movl %0,%%gs": :"r" (0)); \ |
446 | regs->xgs = 0; \ | 454 | regs->xfs = 0; \ |
447 | set_fs(USER_DS); \ | 455 | set_fs(USER_DS); \ |
448 | regs->xds = __USER_DS; \ | 456 | regs->xds = __USER_DS; \ |
449 | regs->xes = __USER_DS; \ | 457 | regs->xes = __USER_DS; \ |