提交 6bfe9661 编写于 作者: F Franck Bui-Huu 提交者: Ralf Baechle

[MIPS] signal32: no need to save c0_status register in setup_sigcontext32()

All the information in the MIPS c0_status register is priviledged.
Nothing that would constitute part of the thread context.

The one flag one could possibly argument about might be c0_status.fr
but none of the ABIs or tools or application software can make use
of it.

So for consistency with restore_sigcontext32(), which does not
restore c0_status register, this patch remove the saving part.
Signed-off-by: NFranck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 9432a9ba
...@@ -249,7 +249,6 @@ void output_sc_defines(void) ...@@ -249,7 +249,6 @@ void output_sc_defines(void)
offset("#define SC_MDHI ", struct sigcontext, sc_mdhi); offset("#define SC_MDHI ", struct sigcontext, sc_mdhi);
offset("#define SC_MDLO ", struct sigcontext, sc_mdlo); offset("#define SC_MDLO ", struct sigcontext, sc_mdlo);
offset("#define SC_PC ", struct sigcontext, sc_pc); offset("#define SC_PC ", struct sigcontext, sc_pc);
offset("#define SC_STATUS ", struct sigcontext, sc_status);
offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr); offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr);
offset("#define SC_FPC_EIR ", struct sigcontext, sc_fpc_eir); offset("#define SC_FPC_EIR ", struct sigcontext, sc_fpc_eir);
offset("#define SC_HI1 ", struct sigcontext, sc_hi1); offset("#define SC_HI1 ", struct sigcontext, sc_hi1);
......
...@@ -170,7 +170,6 @@ static int setup_sigcontext32(struct pt_regs *regs, ...@@ -170,7 +170,6 @@ static int setup_sigcontext32(struct pt_regs *regs,
int i; int i;
err |= __put_user(regs->cp0_epc, &sc->sc_pc); err |= __put_user(regs->cp0_epc, &sc->sc_pc);
err |= __put_user(regs->cp0_status, &sc->sc_status);
err |= __put_user(0, &sc->sc_regs[0]); err |= __put_user(0, &sc->sc_regs[0]);
for (i = 1; i < 32; i++) for (i = 1; i < 32; i++)
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
*/ */
struct sigcontext { struct sigcontext {
unsigned int sc_regmask; /* Unused */ unsigned int sc_regmask; /* Unused */
unsigned int sc_status; unsigned int sc_status; /* Unused */
unsigned long long sc_pc; unsigned long long sc_pc;
unsigned long long sc_regs[32]; unsigned long long sc_regs[32];
unsigned long long sc_fpregs[32]; unsigned long long sc_fpregs[32];
...@@ -76,7 +76,7 @@ struct sigcontext { ...@@ -76,7 +76,7 @@ struct sigcontext {
struct sigcontext32 { struct sigcontext32 {
__u32 sc_regmask; /* Unused */ __u32 sc_regmask; /* Unused */
__u32 sc_status; __u32 sc_status; /* Unused */
__u64 sc_pc; __u64 sc_pc;
__u64 sc_regs[32]; __u64 sc_regs[32];
__u64 sc_fpregs[32]; __u64 sc_fpregs[32];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册