]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
MIPS: Add offsets to sigcontext FP fields to struct mips_abi
authorPaul Burton <paul.burton@imgtec.com>
Mon, 27 Jul 2015 19:58:14 +0000 (12:58 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 3 Sep 2015 10:07:55 +0000 (12:07 +0200)
Add fields to struct mips_abi, which holds information regarding the
kernel-userland ABI regarding signals, to specify the offsets to the FP
related fields within the appropriate variant of struct sigcontext.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Matthew Fortune <matthew.fortune@imgtec.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org
Cc: Richard Weinberger <richard@nod.at>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Maciej W. Rozycki <macro@codesourcery.com>
Patchwork: https://patchwork.linux-mips.org/patch/10788/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/abi.h
arch/mips/kernel/signal.c
arch/mips/kernel/signal32.c
arch/mips/kernel/signal_n32.c

index 7186bb51b89b2adea15bced173787c2513b924af..37f84078e78abbe3f6b85841461c8bccc62d6c9a 100644 (file)
@@ -20,6 +20,10 @@ struct mips_abi {
                                     struct pt_regs *regs, sigset_t *set);
        const unsigned long     rt_signal_return_offset;
        const unsigned long     restart;
+
+       unsigned        off_sc_fpregs;
+       unsigned        off_sc_fpc_csr;
+       unsigned        off_sc_used_math;
 };
 
 #endif /* _ASM_ABI_H */
index 796c7d856d7d994145c852080e003995014a8d4a..ddf83189fff8e4ae0216ce698c63b27983e61337 100644 (file)
@@ -521,7 +521,11 @@ struct mips_abi mips_abi = {
        .setup_rt_frame = setup_rt_frame,
        .rt_signal_return_offset =
                offsetof(struct mips_vdso, rt_signal_trampoline),
-       .restart        = __NR_restart_syscall
+       .restart        = __NR_restart_syscall,
+
+       .off_sc_fpregs = offsetof(struct sigcontext, sc_fpregs),
+       .off_sc_fpc_csr = offsetof(struct sigcontext, sc_fpc_csr),
+       .off_sc_used_math = offsetof(struct sigcontext, sc_used_math),
 };
 
 static void handle_signal(struct ksignal *ksig, struct pt_regs *regs)
index 5d7f2634996fd4920f0a4c94e00cd42fae5934b1..da70ea5cf6ec0c50d9cac44d03c65982baa21fa0 100644 (file)
@@ -585,7 +585,11 @@ struct mips_abi mips_abi_32 = {
        .setup_rt_frame = setup_rt_frame_32,
        .rt_signal_return_offset =
                offsetof(struct mips_vdso, o32_rt_signal_trampoline),
-       .restart        = __NR_O32_restart_syscall
+       .restart        = __NR_O32_restart_syscall,
+
+       .off_sc_fpregs = offsetof(struct sigcontext32, sc_fpregs),
+       .off_sc_fpc_csr = offsetof(struct sigcontext32, sc_fpc_csr),
+       .off_sc_used_math = offsetof(struct sigcontext32, sc_used_math),
 };
 
 static int signal32_init(void)
index f1d4751eead09875c9746163267d93a57abea416..0d017fdcaf07aa50c583e644f4dc1f21d9ab80ee 100644 (file)
@@ -153,5 +153,9 @@ struct mips_abi mips_abi_n32 = {
        .setup_rt_frame = setup_rt_frame_n32,
        .rt_signal_return_offset =
                offsetof(struct mips_vdso, n32_rt_signal_trampoline),
-       .restart        = __NR_N32_restart_syscall
+       .restart        = __NR_N32_restart_syscall,
+
+       .off_sc_fpregs = offsetof(struct sigcontext, sc_fpregs),
+       .off_sc_fpc_csr = offsetof(struct sigcontext, sc_fpc_csr),
+       .off_sc_used_math = offsetof(struct sigcontext, sc_used_math),
 };