aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/processor.h')
-rw-r--r--arch/s390/include/asm/processor.h66
1 files changed, 1 insertions, 65 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index e7cbbdcdee13..dedb6218544b 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -19,7 +19,6 @@
19#define _CIF_ASCE (1<<CIF_ASCE) 19#define _CIF_ASCE (1<<CIF_ASCE)
20#define _CIF_NOHZ_DELAY (1<<CIF_NOHZ_DELAY) 20#define _CIF_NOHZ_DELAY (1<<CIF_NOHZ_DELAY)
21 21
22
23#ifndef __ASSEMBLY__ 22#ifndef __ASSEMBLY__
24 23
25#include <linux/linkage.h> 24#include <linux/linkage.h>
@@ -66,13 +65,6 @@ extern void execve_tail(void);
66/* 65/*
67 * User space process size: 2GB for 31 bit, 4TB or 8PT for 64 bit. 66 * User space process size: 2GB for 31 bit, 4TB or 8PT for 64 bit.
68 */ 67 */
69#ifndef CONFIG_64BIT
70
71#define TASK_SIZE (1UL << 31)
72#define TASK_MAX_SIZE (1UL << 31)
73#define TASK_UNMAPPED_BASE (1UL << 30)
74
75#else /* CONFIG_64BIT */
76 68
77#define TASK_SIZE_OF(tsk) ((tsk)->mm->context.asce_limit) 69#define TASK_SIZE_OF(tsk) ((tsk)->mm->context.asce_limit)
78#define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \ 70#define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \
@@ -80,15 +72,8 @@ extern void execve_tail(void);
80#define TASK_SIZE TASK_SIZE_OF(current) 72#define TASK_SIZE TASK_SIZE_OF(current)
81#define TASK_MAX_SIZE (1UL << 53) 73#define TASK_MAX_SIZE (1UL << 53)
82 74
83#endif /* CONFIG_64BIT */
84
85#ifndef CONFIG_64BIT
86#define STACK_TOP (1UL << 31)
87#define STACK_TOP_MAX (1UL << 31)
88#else /* CONFIG_64BIT */
89#define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:42)) 75#define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:42))
90#define STACK_TOP_MAX (1UL << 42) 76#define STACK_TOP_MAX (1UL << 42)
91#endif /* CONFIG_64BIT */
92 77
93#define HAVE_ARCH_PICK_MMAP_LAYOUT 78#define HAVE_ARCH_PICK_MMAP_LAYOUT
94 79
@@ -115,10 +100,8 @@ struct thread_struct {
115 /* cpu runtime instrumentation */ 100 /* cpu runtime instrumentation */
116 struct runtime_instr_cb *ri_cb; 101 struct runtime_instr_cb *ri_cb;
117 int ri_signum; 102 int ri_signum;
118#ifdef CONFIG_64BIT
119 unsigned char trap_tdb[256]; /* Transaction abort diagnose block */ 103 unsigned char trap_tdb[256]; /* Transaction abort diagnose block */
120 __vector128 *vxrs; /* Vector register save area */ 104 __vector128 *vxrs; /* Vector register save area */
121#endif
122}; 105};
123 106
124/* Flag to disable transactions. */ 107/* Flag to disable transactions. */
@@ -181,11 +164,7 @@ struct task_struct;
181struct mm_struct; 164struct mm_struct;
182struct seq_file; 165struct seq_file;
183 166
184#ifdef CONFIG_64BIT 167void show_cacheinfo(struct seq_file *m);
185extern void show_cacheinfo(struct seq_file *m);
186#else
187static inline void show_cacheinfo(struct seq_file *m) { }
188#endif
189 168
190/* Free all resources held by a thread. */ 169/* Free all resources held by a thread. */
191extern void release_thread(struct task_struct *); 170extern void release_thread(struct task_struct *);
@@ -229,11 +208,7 @@ static inline void psw_set_key(unsigned int key)
229 */ 208 */
230static inline void __load_psw(psw_t psw) 209static inline void __load_psw(psw_t psw)
231{ 210{
232#ifndef CONFIG_64BIT
233 asm volatile("lpsw %0" : : "Q" (psw) : "cc");
234#else
235 asm volatile("lpswe %0" : : "Q" (psw) : "cc"); 211 asm volatile("lpswe %0" : : "Q" (psw) : "cc");
236#endif
237} 212}
238 213
239/* 214/*
@@ -247,22 +222,12 @@ static inline void __load_psw_mask (unsigned long mask)
247 222
248 psw.mask = mask; 223 psw.mask = mask;
249 224
250#ifndef CONFIG_64BIT
251 asm volatile(
252 " basr %0,0\n"
253 "0: ahi %0,1f-0b\n"
254 " st %0,%O1+4(%R1)\n"
255 " lpsw %1\n"
256 "1:"
257 : "=&d" (addr), "=Q" (psw) : "Q" (psw) : "memory", "cc");
258#else /* CONFIG_64BIT */
259 asm volatile( 225 asm volatile(
260 " larl %0,1f\n" 226 " larl %0,1f\n"
261 " stg %0,%O1+8(%R1)\n" 227 " stg %0,%O1+8(%R1)\n"
262 " lpswe %1\n" 228 " lpswe %1\n"
263 "1:" 229 "1:"
264 : "=&d" (addr), "=Q" (psw) : "Q" (psw) : "memory", "cc"); 230 : "=&d" (addr), "=Q" (psw) : "Q" (psw) : "memory", "cc");
265#endif /* CONFIG_64BIT */
266} 231}
267 232
268/* 233/*
@@ -270,20 +235,12 @@ static inline void __load_psw_mask (unsigned long mask)
270 */ 235 */
271static inline unsigned long __rewind_psw(psw_t psw, unsigned long ilc) 236static inline unsigned long __rewind_psw(psw_t psw, unsigned long ilc)
272{ 237{
273#ifndef CONFIG_64BIT
274 if (psw.addr & PSW_ADDR_AMODE)
275 /* 31 bit mode */
276 return (psw.addr - ilc) | PSW_ADDR_AMODE;
277 /* 24 bit mode */
278 return (psw.addr - ilc) & ((1UL << 24) - 1);
279#else
280 unsigned long mask; 238 unsigned long mask;
281 239
282 mask = (psw.mask & PSW_MASK_EA) ? -1UL : 240 mask = (psw.mask & PSW_MASK_EA) ? -1UL :
283 (psw.mask & PSW_MASK_BA) ? (1UL << 31) - 1 : 241 (psw.mask & PSW_MASK_BA) ? (1UL << 31) - 1 :
284 (1UL << 24) - 1; 242 (1UL << 24) - 1;
285 return (psw.addr - ilc) & mask; 243 return (psw.addr - ilc) & mask;
286#endif
287} 244}
288 245
289/* 246/*
@@ -305,26 +262,6 @@ static inline void __noreturn disabled_wait(unsigned long code)
305 * Store status and then load disabled wait psw, 262 * Store status and then load disabled wait psw,
306 * the processor is dead afterwards 263 * the processor is dead afterwards
307 */ 264 */
308#ifndef CONFIG_64BIT
309 asm volatile(
310 " stctl 0,0,0(%2)\n"
311 " ni 0(%2),0xef\n" /* switch off protection */
312 " lctl 0,0,0(%2)\n"
313 " stpt 0xd8\n" /* store timer */
314 " stckc 0xe0\n" /* store clock comparator */
315 " stpx 0x108\n" /* store prefix register */
316 " stam 0,15,0x120\n" /* store access registers */
317 " std 0,0x160\n" /* store f0 */
318 " std 2,0x168\n" /* store f2 */
319 " std 4,0x170\n" /* store f4 */
320 " std 6,0x178\n" /* store f6 */
321 " stm 0,15,0x180\n" /* store general registers */
322 " stctl 0,15,0x1c0\n" /* store control registers */
323 " oi 0x1c0,0x10\n" /* fake protection bit */
324 " lpsw 0(%1)"
325 : "=m" (ctl_buf)
326 : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc");
327#else /* CONFIG_64BIT */
328 asm volatile( 265 asm volatile(
329 " stctg 0,0,0(%2)\n" 266 " stctg 0,0,0(%2)\n"
330 " ni 4(%2),0xef\n" /* switch off protection */ 267 " ni 4(%2),0xef\n" /* switch off protection */
@@ -357,7 +294,6 @@ static inline void __noreturn disabled_wait(unsigned long code)
357 " lpswe 0(%1)" 294 " lpswe 0(%1)"
358 : "=m" (ctl_buf) 295 : "=m" (ctl_buf)
359 : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0", "1"); 296 : "a" (&dw_psw), "a" (&ctl_buf), "m" (dw_psw) : "cc", "0", "1");
360#endif /* CONFIG_64BIT */
361 while (1); 297 while (1);
362} 298}
363 299