[MIPS] Update struct sigcontext member names
Rename the 64-bit sc_hi and sc_lo arrays to use the same names as the 32-bit struct sigcontext (sc_mdhi, sc_hi1, et cetera). Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
Родитель
6ee1da94c5
Коммит
1c0c1ae4f3
|
@ -272,8 +272,8 @@ void output_sc_defines(void)
|
|||
text("/* Linux sigcontext offsets. */");
|
||||
offset("#define SC_REGS ", struct sigcontext, sc_regs);
|
||||
offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs);
|
||||
offset("#define SC_MDHI ", struct sigcontext, sc_hi);
|
||||
offset("#define SC_MDLO ", struct sigcontext, sc_lo);
|
||||
offset("#define SC_MDHI ", struct sigcontext, sc_mdhi);
|
||||
offset("#define SC_MDLO ", struct sigcontext, sc_mdlo);
|
||||
offset("#define SC_PC ", struct sigcontext, sc_pc);
|
||||
offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr);
|
||||
linefeed;
|
||||
|
|
|
@ -31,7 +31,6 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
|
|||
save_gp_reg(31);
|
||||
#undef save_gp_reg
|
||||
|
||||
#ifdef CONFIG_32BIT
|
||||
err |= __put_user(regs->hi, &sc->sc_mdhi);
|
||||
err |= __put_user(regs->lo, &sc->sc_mdlo);
|
||||
if (cpu_has_dsp) {
|
||||
|
@ -43,20 +42,6 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
|
|||
err |= __put_user(mflo3(), &sc->sc_lo3);
|
||||
err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
err |= __put_user(regs->hi, &sc->sc_hi[0]);
|
||||
err |= __put_user(regs->lo, &sc->sc_lo[0]);
|
||||
if (cpu_has_dsp) {
|
||||
err |= __put_user(mfhi1(), &sc->sc_hi[1]);
|
||||
err |= __put_user(mflo1(), &sc->sc_lo[1]);
|
||||
err |= __put_user(mfhi2(), &sc->sc_hi[2]);
|
||||
err |= __put_user(mflo2(), &sc->sc_lo[2]);
|
||||
err |= __put_user(mfhi3(), &sc->sc_hi[3]);
|
||||
err |= __put_user(mflo3(), &sc->sc_lo[3]);
|
||||
err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
|
||||
}
|
||||
#endif
|
||||
|
||||
err |= __put_user(!!used_math(), &sc->sc_used_math);
|
||||
|
||||
|
@ -92,7 +77,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
|
|||
current_thread_info()->restart_block.fn = do_no_restart_syscall;
|
||||
|
||||
err |= __get_user(regs->cp0_epc, &sc->sc_pc);
|
||||
#ifdef CONFIG_32BIT
|
||||
err |= __get_user(regs->hi, &sc->sc_mdhi);
|
||||
err |= __get_user(regs->lo, &sc->sc_mdlo);
|
||||
if (cpu_has_dsp) {
|
||||
|
@ -104,20 +88,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
|
|||
err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
|
||||
err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_64BIT
|
||||
err |= __get_user(regs->hi, &sc->sc_hi[0]);
|
||||
err |= __get_user(regs->lo, &sc->sc_lo[0]);
|
||||
if (cpu_has_dsp) {
|
||||
err |= __get_user(treg, &sc->sc_hi[1]); mthi1(treg);
|
||||
err |= __get_user(treg, &sc->sc_lo[1]); mthi1(treg);
|
||||
err |= __get_user(treg, &sc->sc_hi[2]); mthi2(treg);
|
||||
err |= __get_user(treg, &sc->sc_lo[2]); mthi2(treg);
|
||||
err |= __get_user(treg, &sc->sc_hi[3]); mthi3(treg);
|
||||
err |= __get_user(treg, &sc->sc_lo[3]); mthi3(treg);
|
||||
err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
|
||||
}
|
||||
#endif
|
||||
|
||||
#define restore_gp_reg(i) do { \
|
||||
err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \
|
||||
|
|
|
@ -55,8 +55,14 @@ struct sigcontext {
|
|||
struct sigcontext {
|
||||
unsigned long sc_regs[32];
|
||||
unsigned long sc_fpregs[32];
|
||||
unsigned long sc_hi[4];
|
||||
unsigned long sc_lo[4];
|
||||
unsigned long sc_mdhi;
|
||||
unsigned long sc_hi1;
|
||||
unsigned long sc_hi2;
|
||||
unsigned long sc_hi3;
|
||||
unsigned long sc_mdlo;
|
||||
unsigned long sc_lo1;
|
||||
unsigned long sc_lo2;
|
||||
unsigned long sc_lo3;
|
||||
unsigned long sc_pc;
|
||||
unsigned int sc_fpc_csr;
|
||||
unsigned int sc_used_math;
|
||||
|
|
Загрузка…
Ссылка в новой задаче