x86/fpu: Split out the fpu__activate_fpstate_read() method
authorIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 10:22:29 +0000 (12:22 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 12:11:24 +0000 (14:11 +0200)
commit0560281266b313400b622c5ddfafb0ee8e59c702
tree9af9864ccb4e8fe597c97914a020b9f92cd91281
parent47f01e8cc23f3d041f6b9fb97627369eaf75ba7f
x86/fpu: Split out the fpu__activate_fpstate_read() method

Currently fpu__activate_fpstate() is used for two distinct purposes:

  - read access by ptrace and core dumping, where in the core dumping
    case the current task's FPU state may be examined as well.

  - write access by ptrace, which modifies FPU registers and expects
    the modified registers to be reloaded on the next context switch.

Split out the reading side into fpu__activate_fpstate_read().

( Note that this is just a pure duplication of fpu__activate_fpstate()
  for the time being, we'll optimize the new function in the next patch. )

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Bobby Powers <bobbypowers@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/fpu/internal.h
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/regset.c