diff options
Diffstat (limited to 'arch/s390/include/asm/switch_to.h')
-rw-r--r-- | arch/s390/include/asm/switch_to.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/arch/s390/include/asm/switch_to.h b/arch/s390/include/asm/switch_to.h index 2542a7e4c8b4..d62e7a69605f 100644 --- a/arch/s390/include/asm/switch_to.h +++ b/arch/s390/include/asm/switch_to.h | |||
@@ -18,9 +18,6 @@ static inline int test_fp_ctl(u32 fpc) | |||
18 | u32 orig_fpc; | 18 | u32 orig_fpc; |
19 | int rc; | 19 | int rc; |
20 | 20 | ||
21 | if (!MACHINE_HAS_IEEE) | ||
22 | return 0; | ||
23 | |||
24 | asm volatile( | 21 | asm volatile( |
25 | " efpc %1\n" | 22 | " efpc %1\n" |
26 | " sfpc %2\n" | 23 | " sfpc %2\n" |
@@ -35,9 +32,6 @@ static inline int test_fp_ctl(u32 fpc) | |||
35 | 32 | ||
36 | static inline void save_fp_ctl(u32 *fpc) | 33 | static inline void save_fp_ctl(u32 *fpc) |
37 | { | 34 | { |
38 | if (!MACHINE_HAS_IEEE) | ||
39 | return; | ||
40 | |||
41 | asm volatile( | 35 | asm volatile( |
42 | " stfpc %0\n" | 36 | " stfpc %0\n" |
43 | : "+Q" (*fpc)); | 37 | : "+Q" (*fpc)); |
@@ -47,9 +41,6 @@ static inline int restore_fp_ctl(u32 *fpc) | |||
47 | { | 41 | { |
48 | int rc; | 42 | int rc; |
49 | 43 | ||
50 | if (!MACHINE_HAS_IEEE) | ||
51 | return 0; | ||
52 | |||
53 | asm volatile( | 44 | asm volatile( |
54 | " lfpc %1\n" | 45 | " lfpc %1\n" |
55 | "0: la %0,0\n" | 46 | "0: la %0,0\n" |
@@ -65,8 +56,6 @@ static inline void save_fp_regs(freg_t *fprs) | |||
65 | asm volatile("std 2,%0" : "=Q" (fprs[2])); | 56 | asm volatile("std 2,%0" : "=Q" (fprs[2])); |
66 | asm volatile("std 4,%0" : "=Q" (fprs[4])); | 57 | asm volatile("std 4,%0" : "=Q" (fprs[4])); |
67 | asm volatile("std 6,%0" : "=Q" (fprs[6])); | 58 | asm volatile("std 6,%0" : "=Q" (fprs[6])); |
68 | if (!MACHINE_HAS_IEEE) | ||
69 | return; | ||
70 | asm volatile("std 1,%0" : "=Q" (fprs[1])); | 59 | asm volatile("std 1,%0" : "=Q" (fprs[1])); |
71 | asm volatile("std 3,%0" : "=Q" (fprs[3])); | 60 | asm volatile("std 3,%0" : "=Q" (fprs[3])); |
72 | asm volatile("std 5,%0" : "=Q" (fprs[5])); | 61 | asm volatile("std 5,%0" : "=Q" (fprs[5])); |
@@ -87,8 +76,6 @@ static inline void restore_fp_regs(freg_t *fprs) | |||
87 | asm volatile("ld 2,%0" : : "Q" (fprs[2])); | 76 | asm volatile("ld 2,%0" : : "Q" (fprs[2])); |
88 | asm volatile("ld 4,%0" : : "Q" (fprs[4])); | 77 | asm volatile("ld 4,%0" : : "Q" (fprs[4])); |
89 | asm volatile("ld 6,%0" : : "Q" (fprs[6])); | 78 | asm volatile("ld 6,%0" : : "Q" (fprs[6])); |
90 | if (!MACHINE_HAS_IEEE) | ||
91 | return; | ||
92 | asm volatile("ld 1,%0" : : "Q" (fprs[1])); | 79 | asm volatile("ld 1,%0" : : "Q" (fprs[1])); |
93 | asm volatile("ld 3,%0" : : "Q" (fprs[3])); | 80 | asm volatile("ld 3,%0" : : "Q" (fprs[3])); |
94 | asm volatile("ld 5,%0" : : "Q" (fprs[5])); | 81 | asm volatile("ld 5,%0" : : "Q" (fprs[5])); |
@@ -140,22 +127,18 @@ static inline void restore_vx_regs(__vector128 *vxrs) | |||
140 | 127 | ||
141 | static inline void save_fp_vx_regs(struct task_struct *task) | 128 | static inline void save_fp_vx_regs(struct task_struct *task) |
142 | { | 129 | { |
143 | #ifdef CONFIG_64BIT | ||
144 | if (task->thread.vxrs) | 130 | if (task->thread.vxrs) |
145 | save_vx_regs(task->thread.vxrs); | 131 | save_vx_regs(task->thread.vxrs); |
146 | else | 132 | else |
147 | #endif | 133 | save_fp_regs(task->thread.fp_regs.fprs); |
148 | save_fp_regs(task->thread.fp_regs.fprs); | ||
149 | } | 134 | } |
150 | 135 | ||
151 | static inline void restore_fp_vx_regs(struct task_struct *task) | 136 | static inline void restore_fp_vx_regs(struct task_struct *task) |
152 | { | 137 | { |
153 | #ifdef CONFIG_64BIT | ||
154 | if (task->thread.vxrs) | 138 | if (task->thread.vxrs) |
155 | restore_vx_regs(task->thread.vxrs); | 139 | restore_vx_regs(task->thread.vxrs); |
156 | else | 140 | else |
157 | #endif | 141 | restore_fp_regs(task->thread.fp_regs.fprs); |
158 | restore_fp_regs(task->thread.fp_regs.fprs); | ||
159 | } | 142 | } |
160 | 143 | ||
161 | static inline void save_access_regs(unsigned int *acrs) | 144 | static inline void save_access_regs(unsigned int *acrs) |