X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=include%2Fasm-i386%2Fprocessor.h;h=edfbe46a5e13c8042a1b589ee23f2f2c45918a73;hp=a52d65440429b99520ff6fa355ccd95d92611619;hb=c0cd79d11412969b6b8fa1624cdc1277db82e2fe;hpb=2fd8507d14ef7af3ae05316b3277044cf6daa381 diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index a52d65440429..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; \ @@ -743,6 +751,7 @@ extern void enable_sep_cpu(void); extern int sysenter_setup(void); extern int init_gdt(int cpu, struct task_struct *idle); +extern void cpu_set_gdt(int); extern void secondary_cpu_init(void); #endif /* __ASM_I386_PROCESSOR_H */