]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86/elf.h
x86_64: use save/loadsegment in ia32 compat
[linux-2.6-omap-h63xx.git] / include / asm-x86 / elf.h
index 8f232dc5b5fe09dc81274a5eb830ee352c052169..acbf3451b96439fd4f20754d5936998457e7ac66 100644 (file)
@@ -83,9 +83,9 @@ extern unsigned int vdso_enabled;
        (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486))
 
 #include <asm/processor.h>
+#include <asm/system.h>
 
 #ifdef CONFIG_X86_32
-#include <asm/system.h>                /* for savesegment */
 #include <asm/desc.h>
 
 #define elf_check_arch(x)      elf_check_arch_ia32(x)
@@ -148,8 +148,9 @@ do {                                                \
 
 static inline void start_ia32_thread(struct pt_regs *regs, u32 ip, u32 sp)
 {
-       asm volatile("movl %0,%%fs" :: "r" (0));
-       asm volatile("movl %0,%%es; movl %0,%%ds" : : "r" (__USER32_DS));
+       loadsegment(fs, 0);
+       loadsegment(ds, __USER32_DS);
+       loadsegment(es, __USER32_DS);
        load_gs_index(0);
        regs->ip = ip;
        regs->sp = sp;