Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 May 2012 17:59:07 +0000 (10:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 May 2012 17:59:07 +0000 (10:59 -0700)
Pull fpu state cleanups from Ingo Molnar:
 "This tree streamlines further aspects of FPU handling by eliminating
  the prepare_to_copy() complication and moving that logic to
  arch_dup_task_struct().

  It also fixes the FPU dumps in threaded core dumps, removes and old
  (and now invalid) assumption plus micro-optimizes the exit path by
  avoiding an FPU save for dead tasks."

Fixed up trivial add-add conflict in arch/sh/kernel/process.c that came
in because we now do the FPU handling in arch_dup_task_struct() rather
than the legacy (and now gone) prepare_to_copy().

* 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, fpu: drop the fpu state during thread exit
  x86, xsave: remove thread_has_fpu() bug check in __sanitize_i387_state()
  coredump: ensure the fpu state is flushed for proper multi-threaded core dump
  fork: move the real prepare_to_copy() users to arch_dup_task_struct()

18 files changed:
1  2 
arch/arm/include/asm/processor.h
arch/cris/include/asm/processor.h
arch/frv/include/asm/processor.h
arch/frv/kernel/process.c
arch/ia64/include/asm/processor.h
arch/powerpc/include/asm/processor.h
arch/powerpc/kernel/process.c
arch/sh/include/asm/processor_64.h
arch/sh/kernel/process.c
arch/sh/kernel/process_32.c
arch/sparc/include/asm/processor_32.h
arch/um/include/asm/processor-generic.h
arch/x86/include/asm/processor.h
arch/x86/kernel/process.c
arch/x86/kernel/process_32.c
arch/x86/kernel/process_64.c
fs/exec.c
kernel/fork.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -8,13 -6,15 +8,20 @@@
  struct kmem_cache *task_xstate_cachep = NULL;
  unsigned int xstate_size;
  
 +#ifdef CONFIG_CC_STACKPROTECTOR
 +unsigned long __stack_chk_guard __read_mostly;
 +EXPORT_SYMBOL(__stack_chk_guard);
 +#endif
 +
+ /*
+  * this gets called so that we can store lazy state into memory and copy the
+  * current task into the new thread.
+  */
  int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
  {
+ #ifdef CONFIG_SUPERH32
+       unlazy_fpu(src, task_pt_regs(src));
+ #endif
        *dst = *src;
  
        if (src->thread.xstate) {
Simple merge
Simple merge
Simple merge
@@@ -111,8 -119,16 +127,10 @@@ void exit_thread(void
                put_cpu();
                kfree(bp);
        }
+       drop_fpu(me);
  }
  
 -void show_regs(struct pt_regs *regs)
 -{
 -      show_registers(regs);
 -      show_trace(NULL, regs, (unsigned long *)kernel_stack_pointer(regs), 0);
 -}
 -
  void show_regs_common(void)
  {
        const char *vendor, *product, *board;
Simple merge
Simple merge
diff --cc fs/exec.c
Simple merge
diff --cc kernel/fork.c
Simple merge