aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/processor.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2011-10-30 10:16:50 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-10-30 10:16:43 -0400
commitb50511e41aa51a89b4176784a670582424bc7db6 (patch)
tree0ad1553c7f2431878310e590187ee59ccb4d8cab /arch/s390/include/asm/processor.h
parentb6ef5bb3d93efb95ba855a628740375c2280a59e (diff)
[S390] cleanup psw related bits and pieces
Split out addressing mode bits from PSW_BASE_BITS, rename PSW_BASE_BITS to PSW_MASK_BASE, get rid of psw_user32_bits, remove unused function enabled_wait(), introduce PSW_MASK_USER, and drop PSW_MASK_MERGE macros. Change psw_kernel_bits / psw_user_bits to contain only the bits that are always set in the respective mode. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/processor.h')
-rw-r--r--arch/s390/include/asm/processor.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index 306c93c1b184..20ffb12d4ae9 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -118,17 +118,17 @@ struct stack_frame {
118/* 118/*
119 * Do necessary setup to start up a new thread. 119 * Do necessary setup to start up a new thread.
120 */ 120 */
121#define start_thread(regs, new_psw, new_stackp) do { \ 121#define start_thread(regs, new_psw, new_stackp) do { \
122 regs->psw.mask = psw_user_bits; \ 122 regs->psw.mask = psw_user_bits | PSW_MASK_EA | PSW_MASK_BA; \
123 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \ 123 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \
124 regs->gprs[15] = new_stackp; \ 124 regs->gprs[15] = new_stackp; \
125} while (0) 125} while (0)
126 126
127#define start_thread31(regs, new_psw, new_stackp) do { \ 127#define start_thread31(regs, new_psw, new_stackp) do { \
128 regs->psw.mask = psw_user32_bits; \ 128 regs->psw.mask = psw_user_bits | PSW_MASK_BA; \
129 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \ 129 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \
130 regs->gprs[15] = new_stackp; \ 130 regs->gprs[15] = new_stackp; \
131 crst_table_downgrade(current->mm, 1UL << 31); \ 131 crst_table_downgrade(current->mm, 1UL << 31); \
132} while (0) 132} while (0)
133 133
134/* Forward declaration, a strange C thing */ 134/* Forward declaration, a strange C thing */
@@ -234,24 +234,14 @@ static inline unsigned long __rewind_psw(psw_t psw, unsigned long ilc)
234} 234}
235 235
236/* 236/*
237 * Function to stop a processor until an interruption occurred
238 */
239static inline void enabled_wait(void)
240{
241 __load_psw_mask(PSW_BASE_BITS | PSW_MASK_IO | PSW_MASK_EXT |
242 PSW_MASK_MCHECK | PSW_MASK_WAIT | PSW_DEFAULT_KEY);
243}
244
245/*
246 * Function to drop a processor into disabled wait state 237 * Function to drop a processor into disabled wait state
247 */ 238 */
248
249static inline void ATTRIB_NORET disabled_wait(unsigned long code) 239static inline void ATTRIB_NORET disabled_wait(unsigned long code)
250{ 240{
251 unsigned long ctl_buf; 241 unsigned long ctl_buf;
252 psw_t dw_psw; 242 psw_t dw_psw;
253 243
254 dw_psw.mask = PSW_BASE_BITS | PSW_MASK_WAIT; 244 dw_psw.mask = PSW_MASK_BASE | PSW_MASK_WAIT | PSW_MASK_BA | PSW_MASK_EA;
255 dw_psw.addr = code; 245 dw_psw.addr = code;
256 /* 246 /*
257 * Store status and then load disabled wait psw, 247 * Store status and then load disabled wait psw,