aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/include/asm/switch_to.h1
-rw-r--r--arch/s390/kernel/compat_signal.c6
-rw-r--r--arch/s390/kernel/signal.c6
3 files changed, 6 insertions, 7 deletions
diff --git a/arch/s390/include/asm/switch_to.h b/arch/s390/include/asm/switch_to.h
index d62e7a69605f..b304031d9d11 100644
--- a/arch/s390/include/asm/switch_to.h
+++ b/arch/s390/include/asm/switch_to.h
@@ -45,7 +45,6 @@ static inline int restore_fp_ctl(u32 *fpc)
45 " lfpc %1\n" 45 " lfpc %1\n"
46 "0: la %0,0\n" 46 "0: la %0,0\n"
47 "1:\n" 47 "1:\n"
48 EX_TABLE(0b,1b)
49 : "=d" (rc) : "Q" (*fpc), "0" (-EINVAL)); 48 : "=d" (rc) : "Q" (*fpc), "0" (-EINVAL));
50 return rc; 49 return rc;
51} 50}
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index fe8d6924efaa..b55d2063a23d 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -172,7 +172,7 @@ static void load_sigregs(void)
172 int i; 172 int i;
173 173
174 restore_access_regs(current->thread.acrs); 174 restore_access_regs(current->thread.acrs);
175 /* restore_fp_ctl is done in restore_sigregs */ 175 restore_fp_ctl(&current->thread.fp_regs.fpc);
176 if (current->thread.vxrs) { 176 if (current->thread.vxrs) {
177 for (i = 0; i < __NUM_FPRS; i++) 177 for (i = 0; i < __NUM_FPRS; i++)
178 *(freg_t *)(current->thread.vxrs + i) = 178 *(freg_t *)(current->thread.vxrs + i) =
@@ -217,8 +217,8 @@ static int restore_sigregs32(struct pt_regs *regs,_sigregs32 __user *sregs)
217 if (!is_ri_task(current) && (user_sregs.regs.psw.mask & PSW32_MASK_RI)) 217 if (!is_ri_task(current) && (user_sregs.regs.psw.mask & PSW32_MASK_RI))
218 return -EINVAL; 218 return -EINVAL;
219 219
220 /* Loading the floating-point-control word can fail. Do that first. */ 220 /* Test the floating-point-control word. */
221 if (restore_fp_ctl(&user_sregs.fpregs.fpc)) 221 if (test_fp_ctl(user_sregs.fpregs.fpc))
222 return -EINVAL; 222 return -EINVAL;
223 223
224 /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ 224 /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index c551f22ce066..98520c8ae0ee 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -121,7 +121,7 @@ static void store_sigregs(void)
121static void load_sigregs(void) 121static void load_sigregs(void)
122{ 122{
123 restore_access_regs(current->thread.acrs); 123 restore_access_regs(current->thread.acrs);
124 /* restore_fp_ctl is done in restore_sigregs */ 124 restore_fp_ctl(&current->thread.fp_regs.fpc);
125 if (current->thread.vxrs) { 125 if (current->thread.vxrs) {
126 int i; 126 int i;
127 127
@@ -166,8 +166,8 @@ static int restore_sigregs(struct pt_regs *regs, _sigregs __user *sregs)
166 if (!is_ri_task(current) && (user_sregs.regs.psw.mask & PSW_MASK_RI)) 166 if (!is_ri_task(current) && (user_sregs.regs.psw.mask & PSW_MASK_RI))
167 return -EINVAL; 167 return -EINVAL;
168 168
169 /* Loading the floating-point-control word can fail. Do that first. */ 169 /* Test the floating-point-control word. */
170 if (restore_fp_ctl(&user_sregs.fpregs.fpc)) 170 if (test_fp_ctl(user_sregs.fpregs.fpc))
171 return -EINVAL; 171 return -EINVAL;
172 172
173 /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */ 173 /* Use regs->psw.mask instead of PSW_USER_BITS to preserve PER bit. */