aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-05-08 15:28:22 -0400
committerRalf Baechle <ralf@linux-mips.org>2006-05-31 19:28:31 -0400
commit1c0c1ae4f3d5057d091677d0ef7dbaeb28122ded (patch)
tree4daae44b0aa73f4fd1bae00e5fc1434b9465db94
parent6ee1da94c5fed95bacce3eda8e6d9e69324ecab7 (diff)
[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>
-rw-r--r--arch/mips/kernel/asm-offsets.c4
-rw-r--r--arch/mips/kernel/signal-common.h30
-rw-r--r--include/asm-mips/sigcontext.h10
3 files changed, 10 insertions, 34 deletions
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index 92b28b674d6f..0facfaf4e950 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -272,8 +272,8 @@ void output_sc_defines(void)
272 text("/* Linux sigcontext offsets. */"); 272 text("/* Linux sigcontext offsets. */");
273 offset("#define SC_REGS ", struct sigcontext, sc_regs); 273 offset("#define SC_REGS ", struct sigcontext, sc_regs);
274 offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs); 274 offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs);
275 offset("#define SC_MDHI ", struct sigcontext, sc_hi); 275 offset("#define SC_MDHI ", struct sigcontext, sc_mdhi);
276 offset("#define SC_MDLO ", struct sigcontext, sc_lo); 276 offset("#define SC_MDLO ", struct sigcontext, sc_mdlo);
277 offset("#define SC_PC ", struct sigcontext, sc_pc); 277 offset("#define SC_PC ", struct sigcontext, sc_pc);
278 offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr); 278 offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr);
279 linefeed; 279 linefeed;
diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h
index 3ca786215d48..ce6cb915c0a7 100644
--- a/arch/mips/kernel/signal-common.h
+++ b/arch/mips/kernel/signal-common.h
@@ -31,7 +31,6 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
31 save_gp_reg(31); 31 save_gp_reg(31);
32#undef save_gp_reg 32#undef save_gp_reg
33 33
34#ifdef CONFIG_32BIT
35 err |= __put_user(regs->hi, &sc->sc_mdhi); 34 err |= __put_user(regs->hi, &sc->sc_mdhi);
36 err |= __put_user(regs->lo, &sc->sc_mdlo); 35 err |= __put_user(regs->lo, &sc->sc_mdlo);
37 if (cpu_has_dsp) { 36 if (cpu_has_dsp) {
@@ -43,20 +42,6 @@ setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
43 err |= __put_user(mflo3(), &sc->sc_lo3); 42 err |= __put_user(mflo3(), &sc->sc_lo3);
44 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp); 43 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
45 } 44 }
46#endif
47#ifdef CONFIG_64BIT
48 err |= __put_user(regs->hi, &sc->sc_hi[0]);
49 err |= __put_user(regs->lo, &sc->sc_lo[0]);
50 if (cpu_has_dsp) {
51 err |= __put_user(mfhi1(), &sc->sc_hi[1]);
52 err |= __put_user(mflo1(), &sc->sc_lo[1]);
53 err |= __put_user(mfhi2(), &sc->sc_hi[2]);
54 err |= __put_user(mflo2(), &sc->sc_lo[2]);
55 err |= __put_user(mfhi3(), &sc->sc_hi[3]);
56 err |= __put_user(mflo3(), &sc->sc_lo[3]);
57 err |= __put_user(rddsp(DSP_MASK), &sc->sc_dsp);
58 }
59#endif
60 45
61 err |= __put_user(!!used_math(), &sc->sc_used_math); 46 err |= __put_user(!!used_math(), &sc->sc_used_math);
62 47
@@ -92,7 +77,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
92 current_thread_info()->restart_block.fn = do_no_restart_syscall; 77 current_thread_info()->restart_block.fn = do_no_restart_syscall;
93 78
94 err |= __get_user(regs->cp0_epc, &sc->sc_pc); 79 err |= __get_user(regs->cp0_epc, &sc->sc_pc);
95#ifdef CONFIG_32BIT
96 err |= __get_user(regs->hi, &sc->sc_mdhi); 80 err |= __get_user(regs->hi, &sc->sc_mdhi);
97 err |= __get_user(regs->lo, &sc->sc_mdlo); 81 err |= __get_user(regs->lo, &sc->sc_mdlo);
98 if (cpu_has_dsp) { 82 if (cpu_has_dsp) {
@@ -104,20 +88,6 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
104 err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg); 88 err |= __get_user(treg, &sc->sc_lo3); mtlo3(treg);
105 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK); 89 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
106 } 90 }
107#endif
108#ifdef CONFIG_64BIT
109 err |= __get_user(regs->hi, &sc->sc_hi[0]);
110 err |= __get_user(regs->lo, &sc->sc_lo[0]);
111 if (cpu_has_dsp) {
112 err |= __get_user(treg, &sc->sc_hi[1]); mthi1(treg);
113 err |= __get_user(treg, &sc->sc_lo[1]); mthi1(treg);
114 err |= __get_user(treg, &sc->sc_hi[2]); mthi2(treg);
115 err |= __get_user(treg, &sc->sc_lo[2]); mthi2(treg);
116 err |= __get_user(treg, &sc->sc_hi[3]); mthi3(treg);
117 err |= __get_user(treg, &sc->sc_lo[3]); mthi3(treg);
118 err |= __get_user(treg, &sc->sc_dsp); wrdsp(treg, DSP_MASK);
119 }
120#endif
121 91
122#define restore_gp_reg(i) do { \ 92#define restore_gp_reg(i) do { \
123 err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \ 93 err |= __get_user(regs->regs[i], &sc->sc_regs[i]); \
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h
index 8edabb0be23f..cefa657dd04a 100644
--- a/include/asm-mips/sigcontext.h
+++ b/include/asm-mips/sigcontext.h
@@ -55,8 +55,14 @@ struct sigcontext {
55struct sigcontext { 55struct sigcontext {
56 unsigned long sc_regs[32]; 56 unsigned long sc_regs[32];
57 unsigned long sc_fpregs[32]; 57 unsigned long sc_fpregs[32];
58 unsigned long sc_hi[4]; 58 unsigned long sc_mdhi;
59 unsigned long sc_lo[4]; 59 unsigned long sc_hi1;
60 unsigned long sc_hi2;
61 unsigned long sc_hi3;
62 unsigned long sc_mdlo;
63 unsigned long sc_lo1;
64 unsigned long sc_lo2;
65 unsigned long sc_lo3;
60 unsigned long sc_pc; 66 unsigned long sc_pc;
61 unsigned int sc_fpc_csr; 67 unsigned int sc_fpc_csr;
62 unsigned int sc_used_math; 68 unsigned int sc_used_math;