x86, fpu: split FPU state from task struct - v5
[linux-2.6-block.git] / arch / x86 / kernel / traps_64.c
index 6d883b13ef4f5114d3b7a3fad4e7ba48cb9cfb91..dc0cb497eec38d4a142d274f6eac7764b6ce6560 100644 (file)
@@ -1128,7 +1128,7 @@ asmlinkage void math_state_restore(void)
 
        if (!used_math())
                init_fpu(me);
-       restore_fpu_checking(&me->thread.i387.fxsave);
+       restore_fpu_checking(&me->thread.xstate->fxsave);
        task_thread_info(me)->status |= TS_USEDFPU;
        me->fpu_counter++;
 }
@@ -1163,6 +1163,10 @@ void __init trap_init(void)
        set_system_gate(IA32_SYSCALL_VECTOR, ia32_syscall);
 #endif
        
+       /*
+        * initialize the per thread extended state:
+        */
+        init_thread_xstate();
        /*
         * Should be a barrier for any external CPU state.
         */