aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorChris Zankel <chris@zankel.net>2008-02-12 15:22:15 -0500
committerChris Zankel <chris@zankel.net>2008-02-13 20:12:15 -0500
commit3befce8f0f79be8322aba885ed052b8ad927913d (patch)
tree37c163b1e2e488fd9dad269570302637201f3ec7 /arch/xtensa
parent8d7e8240e66cecc84a375aceb26942d02b291198 (diff)
[XTENSA] Remove oldmask from sigcontext and fix register flush
Remove oldmask from the sigcontext structure. Also update wmask and windowstart when we flush the AR registers to stack. Signed-off-by: Chris Zankel <chris@zankel.net>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/kernel/signal.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/xtensa/kernel/signal.c b/arch/xtensa/kernel/signal.c
index 033aae0336d2..42d9fd8a4225 100644
--- a/arch/xtensa/kernel/signal.c
+++ b/arch/xtensa/kernel/signal.c
@@ -49,8 +49,6 @@ struct rt_sigframe
49/* 49/*
50 * Flush register windows stored in pt_regs to stack. 50 * Flush register windows stored in pt_regs to stack.
51 * Returns 1 for errors. 51 * Returns 1 for errors.
52 *
53 * Note that windowbase, windowstart, and wmask are not updated!
54 */ 52 */
55 53
56int 54int
@@ -116,6 +114,9 @@ flush_window_regs_user(struct pt_regs *regs)
116 base += inc; 114 base += inc;
117 } 115 }
118 116
117 regs->wmask = 1;
118 regs->windowstart = 1 << wb;
119
119 return 0; 120 return 0;
120 121
121errout: 122errout:
@@ -132,7 +133,7 @@ errout:
132 133
133static int 134static int
134setup_sigcontext(struct sigcontext __user *sc, cp_state_t *cpstate, 135setup_sigcontext(struct sigcontext __user *sc, cp_state_t *cpstate,
135 struct pt_regs *regs, unsigned long mask) 136 struct pt_regs *regs)
136{ 137{
137 int err = 0; 138 int err = 0;
138 139
@@ -155,8 +156,6 @@ setup_sigcontext(struct sigcontext __user *sc, cp_state_t *cpstate,
155 err |= save_cpextra(cpstate); 156 err |= save_cpextra(cpstate);
156 err |= __put_user(err ? NULL : cpstate, &sc->sc_cpstate); 157 err |= __put_user(err ? NULL : cpstate, &sc->sc_cpstate);
157#endif 158#endif
158 /* non-iBCS2 extensions.. */
159 err |= __put_user(mask, &sc->oldmask);
160 159
161 return err; 160 return err;
162} 161}
@@ -360,8 +359,7 @@ static void setup_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
360 err |= __put_user(sas_ss_flags(regs->areg[1]), 359 err |= __put_user(sas_ss_flags(regs->areg[1]),
361 &frame->uc.uc_stack.ss_flags); 360 &frame->uc.uc_stack.ss_flags);
362 err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size); 361 err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
363 err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->cpstate, 362 err |= setup_sigcontext(&frame->uc.uc_mcontext, &frame->cpstate, regs);
364 regs, set->sig[0]);
365 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set)); 363 err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
366 364
367 /* Create sys_rt_sigreturn syscall in stack frame */ 365 /* Create sys_rt_sigreturn syscall in stack frame */