aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/ia32
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-11-05 21:32:54 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-06 02:02:00 -0500
commit99ea1b93bf80a287dd70499b96d9c4d06f320ff2 (patch)
tree9ad4c59c9019050229223b08730394c8825ecca7 /arch/x86/ia32
parent4b33669e817a01dd99ff91df330d504ccfb2e99c (diff)
x86: ia32_signal: do save_i387_xstate_ia32 at get_sigframe()
Impact: cleanup move calling save_i387_xstate_ia32() into get_sigframe() from setup_sigcontext(). Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/ia32')
-rw-r--r--arch/x86/ia32/ia32_signal.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c
index 4bc02b23674b..47ddc23f4f54 100644
--- a/arch/x86/ia32/ia32_signal.c
+++ b/arch/x86/ia32/ia32_signal.c
@@ -367,12 +367,7 @@ static int ia32_setup_sigcontext(struct sigcontext_ia32 __user *sc,
367 err |= __put_user(regs->flags, &sc->flags); 367 err |= __put_user(regs->flags, &sc->flags);
368 err |= __put_user(regs->sp, &sc->sp_at_signal); 368 err |= __put_user(regs->sp, &sc->sp_at_signal);
369 369
370 tmp = save_i387_xstate_ia32(fpstate); 370 err |= __put_user(ptr_to_compat(fpstate), &sc->fpstate);
371 if (tmp < 0)
372 err = -EFAULT;
373 else
374 err |= __put_user(ptr_to_compat(tmp ? fpstate : NULL),
375 &sc->fpstate);
376 371
377 /* non-iBCS2 extensions.. */ 372 /* non-iBCS2 extensions.. */
378 err |= __put_user(mask, &sc->oldmask); 373 err |= __put_user(mask, &sc->oldmask);
@@ -408,6 +403,8 @@ static void __user *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
408 if (used_math()) { 403 if (used_math()) {
409 sp = sp - sig_xstate_ia32_size; 404 sp = sp - sig_xstate_ia32_size;
410 *fpstate = (struct _fpstate_ia32 *) sp; 405 *fpstate = (struct _fpstate_ia32 *) sp;
406 if (save_i387_xstate_ia32(*fpstate) < 0)
407 return (void __user *) -1L;
411 } 408 }
412 409
413 sp -= frame_size; 410 sp -= frame_size;