diff options
author | Chris Zankel <chris@zankel.net> | 2008-02-12 15:22:15 -0500 |
---|---|---|
committer | Chris Zankel <chris@zankel.net> | 2008-02-13 20:12:15 -0500 |
commit | 3befce8f0f79be8322aba885ed052b8ad927913d (patch) | |
tree | 37c163b1e2e488fd9dad269570302637201f3ec7 | |
parent | 8d7e8240e66cecc84a375aceb26942d02b291198 (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>
-rw-r--r-- | arch/xtensa/kernel/signal.c | 12 | ||||
-rw-r--r-- | include/asm-xtensa/sigcontext.h | 3 |
2 files changed, 5 insertions, 10 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 | ||
56 | int | 54 | int |
@@ -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 | ||
121 | errout: | 122 | errout: |
@@ -132,7 +133,7 @@ errout: | |||
132 | 133 | ||
133 | static int | 134 | static int |
134 | setup_sigcontext(struct sigcontext __user *sc, cp_state_t *cpstate, | 135 | setup_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 */ |
diff --git a/include/asm-xtensa/sigcontext.h b/include/asm-xtensa/sigcontext.h index e3381cee5059..dff3c54a3c12 100644 --- a/include/asm-xtensa/sigcontext.h +++ b/include/asm-xtensa/sigcontext.h | |||
@@ -13,9 +13,6 @@ | |||
13 | 13 | ||
14 | 14 | ||
15 | struct sigcontext { | 15 | struct sigcontext { |
16 | unsigned long oldmask; | ||
17 | |||
18 | /* CPU registers */ | ||
19 | unsigned long sc_pc; | 16 | unsigned long sc_pc; |
20 | unsigned long sc_ps; | 17 | unsigned long sc_ps; |
21 | unsigned long sc_lbeg; | 18 | unsigned long sc_lbeg; |