diff options
Diffstat (limited to 'arch/mips/kernel/signal32.c')
-rw-r--r-- | arch/mips/kernel/signal32.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index 2e74075ac0ca..03abaf048f09 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -35,6 +35,15 @@ | |||
35 | 35 | ||
36 | #include "signal-common.h" | 36 | #include "signal-common.h" |
37 | 37 | ||
38 | static int (*save_fp_context32)(struct sigcontext32 __user *sc); | ||
39 | static int (*restore_fp_context32)(struct sigcontext32 __user *sc); | ||
40 | |||
41 | extern asmlinkage int _save_fp_context32(struct sigcontext32 __user *sc); | ||
42 | extern asmlinkage int _restore_fp_context32(struct sigcontext32 __user *sc); | ||
43 | |||
44 | extern asmlinkage int fpu_emulator_save_context32(struct sigcontext32 __user *sc); | ||
45 | extern asmlinkage int fpu_emulator_restore_context32(struct sigcontext32 __user *sc); | ||
46 | |||
38 | /* | 47 | /* |
39 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... | 48 | * Including <asm/unistd.h> would give use the 64-bit syscall numbers ... |
40 | */ | 49 | */ |
@@ -828,3 +837,18 @@ SYSCALL_DEFINE5(32_waitid, int, which, compat_pid_t, pid, | |||
828 | info.si_code |= __SI_CHLD; | 837 | info.si_code |= __SI_CHLD; |
829 | return copy_siginfo_to_user32(uinfo, &info); | 838 | return copy_siginfo_to_user32(uinfo, &info); |
830 | } | 839 | } |
840 | |||
841 | static int signal32_init(void) | ||
842 | { | ||
843 | if (cpu_has_fpu) { | ||
844 | save_fp_context32 = _save_fp_context32; | ||
845 | restore_fp_context32 = _restore_fp_context32; | ||
846 | } else { | ||
847 | save_fp_context32 = fpu_emulator_save_context32; | ||
848 | restore_fp_context32 = fpu_emulator_restore_context32; | ||
849 | } | ||
850 | |||
851 | return 0; | ||
852 | } | ||
853 | |||
854 | arch_initcall(signal32_init); | ||