aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/processor.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-07 18:24:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-07 18:24:38 -0500
commit280c84d1c1726be7ada045735858acdc8cfdd65a (patch)
treeb9afa3fb97b08272b6952d5c8d1fe31f6a8092fa /arch/s390/include/asm/processor.h
parent8efdf2b759409f85953b84d52a14ea4d39c80474 (diff)
parentde9587a2f54d2d0063f0dbc775328129b9daaaa2 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky: "The bulk of the patches for the 3.13 merge window. Heiko spent quite a bit of work to improve the code generation for the kernel. That includes the exploitation of the interlocked-access facility for the atomics and bitops implementation and the improvement for the -march and -mtune compiler settings. Another important change is the removal of the user_mode=home option, user processes now always run in primary space. The storage keys are not initialized at system startup any more, with that the storage key removal work is complete. For the PCI support the hibernation hooks have been implemented. And as usual cleanup and fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (62 commits) s390/scm_blk: fix endless loop for requests != REQ_TYPE_FS s390/mm,tlb: correct tlb flush on page table upgrade s390/mm: page_table_realloc returns failure s390: allow to set gcc -mtune flag s390/percpu: remove this_cpu_xor() implementation s390/vtime: correct idle time calculation s390/time: fix get_tod_clock_ext inline assembly tty/hvc_iucv: remove redundant NULL check s390/dasd: Write to profile data area only if it is available s390: convert use of typedef ctl_table to struct ctl_table s390/pci: cleanup function information block s390/pci: remove CONFIG_PCI_DEBUG dependancy s390/pci: message cleanup Update default configuration s390: add a couple of useful defconfigs s390/percpu: make use of interlocked-access facility 1 instructions s390/percpu: use generic percpu ops for CONFIG_32BIT s390/compat: make psw32_user_bits a constant value again s390: fix handling of runtime instrumentation psw bit s390: fix save and restore of the floating-point-control register ...
Diffstat (limited to 'arch/s390/include/asm/processor.h')
-rw-r--r--arch/s390/include/asm/processor.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index ca7821f07260..0a876bc543d3 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -134,19 +134,17 @@ struct stack_frame {
134 * Do necessary setup to start up a new thread. 134 * Do necessary setup to start up a new thread.
135 */ 135 */
136#define start_thread(regs, new_psw, new_stackp) do { \ 136#define start_thread(regs, new_psw, new_stackp) do { \
137 regs->psw.mask = psw_user_bits | PSW_MASK_EA | PSW_MASK_BA; \ 137 regs->psw.mask = PSW_USER_BITS | PSW_MASK_EA | PSW_MASK_BA; \
138 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \ 138 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \
139 regs->gprs[15] = new_stackp; \ 139 regs->gprs[15] = new_stackp; \
140 execve_tail(); \ 140 execve_tail(); \
141} while (0) 141} while (0)
142 142
143#define start_thread31(regs, new_psw, new_stackp) do { \ 143#define start_thread31(regs, new_psw, new_stackp) do { \
144 regs->psw.mask = psw_user_bits | PSW_MASK_BA; \ 144 regs->psw.mask = PSW_USER_BITS | PSW_MASK_BA; \
145 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \ 145 regs->psw.addr = new_psw | PSW_ADDR_AMODE; \
146 regs->gprs[15] = new_stackp; \ 146 regs->gprs[15] = new_stackp; \
147 __tlb_flush_mm(current->mm); \
148 crst_table_downgrade(current->mm, 1UL << 31); \ 147 crst_table_downgrade(current->mm, 1UL << 31); \
149 update_mm(current->mm, current); \
150 execve_tail(); \ 148 execve_tail(); \
151} while (0) 149} while (0)
152 150
@@ -169,17 +167,15 @@ extern void release_thread(struct task_struct *);
169 */ 167 */
170extern unsigned long thread_saved_pc(struct task_struct *t); 168extern unsigned long thread_saved_pc(struct task_struct *t);
171 169
172extern void show_code(struct pt_regs *regs);
173extern void print_fn_code(unsigned char *code, unsigned long len);
174extern int insn_to_mnemonic(unsigned char *instruction, char *buf,
175 unsigned int len);
176
177unsigned long get_wchan(struct task_struct *p); 170unsigned long get_wchan(struct task_struct *p);
178#define task_pt_regs(tsk) ((struct pt_regs *) \ 171#define task_pt_regs(tsk) ((struct pt_regs *) \
179 (task_stack_page(tsk) + THREAD_SIZE) - 1) 172 (task_stack_page(tsk) + THREAD_SIZE) - 1)
180#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr) 173#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr)
181#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15]) 174#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15])
182 175
176/* Has task runtime instrumentation enabled ? */
177#define is_ri_task(tsk) (!!(tsk)->thread.ri_cb)
178
183static inline unsigned short stap(void) 179static inline unsigned short stap(void)
184{ 180{
185 unsigned short cpu_address; 181 unsigned short cpu_address;
@@ -348,9 +344,9 @@ __set_psw_mask(unsigned long mask)
348} 344}
349 345
350#define local_mcck_enable() \ 346#define local_mcck_enable() \
351 __set_psw_mask(psw_kernel_bits | PSW_MASK_DAT | PSW_MASK_MCHECK) 347 __set_psw_mask(PSW_KERNEL_BITS | PSW_MASK_DAT | PSW_MASK_MCHECK)
352#define local_mcck_disable() \ 348#define local_mcck_disable() \
353 __set_psw_mask(psw_kernel_bits | PSW_MASK_DAT) 349 __set_psw_mask(PSW_KERNEL_BITS | PSW_MASK_DAT)
354 350
355/* 351/*
356 * Basic Machine Check/Program Check Handler. 352 * Basic Machine Check/Program Check Handler.