aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-s390/processor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-s390/processor.h')
-rw-r--r--include/asm-s390/processor.h45
1 files changed, 15 insertions, 30 deletions
diff --git a/include/asm-s390/processor.h b/include/asm-s390/processor.h
index e8785634cbdb..51d88912aa20 100644
--- a/include/asm-s390/processor.h
+++ b/include/asm-s390/processor.h
@@ -64,24 +64,29 @@ extern int get_cpu_capability(unsigned int *);
64 */ 64 */
65#ifndef __s390x__ 65#ifndef __s390x__
66 66
67# define TASK_SIZE (0x80000000UL) 67#define TASK_SIZE (1UL << 31)
68# define TASK_UNMAPPED_BASE (TASK_SIZE / 2) 68#define TASK_UNMAPPED_BASE (1UL << 30)
69# define DEFAULT_TASK_SIZE (0x80000000UL)
70 69
71#else /* __s390x__ */ 70#else /* __s390x__ */
72 71
73# define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_31BIT) ? \ 72#define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk,TIF_31BIT) ? \
74 (0x80000000UL) : (0x40000000000UL)) 73 (1UL << 31) : (1UL << 53))
75# define TASK_SIZE TASK_SIZE_OF(current) 74#define TASK_UNMAPPED_BASE (test_thread_flag(TIF_31BIT) ? \
76# define TASK_UNMAPPED_BASE (TASK_SIZE / 2) 75 (1UL << 30) : (1UL << 41))
77# define DEFAULT_TASK_SIZE (0x40000000000UL) 76#define TASK_SIZE TASK_SIZE_OF(current)
78 77
79#endif /* __s390x__ */ 78#endif /* __s390x__ */
80 79
81#ifdef __KERNEL__ 80#ifdef __KERNEL__
82 81
83#define STACK_TOP TASK_SIZE 82#ifndef __s390x__
84#define STACK_TOP_MAX DEFAULT_TASK_SIZE 83#define STACK_TOP (1UL << 31)
84#define STACK_TOP_MAX (1UL << 31)
85#else /* __s390x__ */
86#define STACK_TOP (1UL << (test_thread_flag(TIF_31BIT) ? 31:42))
87#define STACK_TOP_MAX (1UL << 42)
88#endif /* __s390x__ */
89
85 90
86#endif 91#endif
87 92
@@ -138,8 +143,6 @@ struct stack_frame {
138/* 143/*
139 * Do necessary setup to start up a new thread. 144 * Do necessary setup to start up a new thread.
140 */ 145 */
141#ifndef __s390x__
142
143#define start_thread(regs, new_psw, new_stackp) do { \ 146#define start_thread(regs, new_psw, new_stackp) do { \
144 set_fs(USER_DS); \ 147 set_fs(USER_DS); \
145 regs->psw.mask = psw_user_bits; \ 148 regs->psw.mask = psw_user_bits; \
@@ -147,24 +150,6 @@ struct stack_frame {
147 regs->gprs[15] = new_stackp ; \ 150 regs->gprs[15] = new_stackp ; \
148} while (0) 151} while (0)
149 152
150#else /* __s390x__ */
151
152#define start_thread(regs, new_psw, new_stackp) do { \
153 set_fs(USER_DS); \
154 regs->psw.mask = psw_user_bits; \
155 regs->psw.addr = new_psw; \
156 regs->gprs[15] = new_stackp; \
157} while (0)
158
159#define start_thread31(regs, new_psw, new_stackp) do { \
160 set_fs(USER_DS); \
161 regs->psw.mask = psw_user32_bits; \
162 regs->psw.addr = new_psw; \
163 regs->gprs[15] = new_stackp; \
164} while (0)
165
166#endif /* __s390x__ */
167
168/* Forward declaration, a strange C thing */ 153/* Forward declaration, a strange C thing */
169struct task_struct; 154struct task_struct;
170struct mm_struct; 155struct mm_struct;