aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/processor.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-03-28 13:30:02 -0400
committerDavid Howells <dhowells@redhat.com>2012-03-28 13:30:02 -0400
commita0616cdebcfd575dcd4c46102d1b52fbb827fc29 (patch)
tree49c67a23f3bcdb72a94317ddeff65e450b574746 /arch/s390/include/asm/processor.h
parentae3a197e3d0bfe3f4bf1693723e82dc018c096f3 (diff)
Disintegrate asm/system.h for S390
Disintegrate asm/system.h for S390. Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-s390@vger.kernel.org
Diffstat (limited to 'arch/s390/include/asm/processor.h')
-rw-r--r--arch/s390/include/asm/processor.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/s390/include/asm/processor.h b/arch/s390/include/asm/processor.h
index d25843a6a915..d499b30ea487 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -14,6 +14,7 @@
14#define __ASM_S390_PROCESSOR_H 14#define __ASM_S390_PROCESSOR_H
15 15
16#include <linux/linkage.h> 16#include <linux/linkage.h>
17#include <linux/irqflags.h>
17#include <asm/cpu.h> 18#include <asm/cpu.h>
18#include <asm/page.h> 19#include <asm/page.h>
19#include <asm/ptrace.h> 20#include <asm/ptrace.h>
@@ -156,6 +157,14 @@ unsigned long get_wchan(struct task_struct *p);
156#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr) 157#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr)
157#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15]) 158#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15])
158 159
160static inline unsigned short stap(void)
161{
162 unsigned short cpu_address;
163
164 asm volatile("stap %0" : "=m" (cpu_address));
165 return cpu_address;
166}
167
159/* 168/*
160 * Give up the time slice of the virtual PU. 169 * Give up the time slice of the virtual PU.
161 */ 170 */
@@ -304,6 +313,21 @@ static inline void __noreturn disabled_wait(unsigned long code)
304} 313}
305 314
306/* 315/*
316 * Use to set psw mask except for the first byte which
317 * won't be changed by this function.
318 */
319static inline void
320__set_psw_mask(unsigned long mask)
321{
322 __load_psw_mask(mask | (arch_local_save_flags() & ~(-1UL >> 8)));
323}
324
325#define local_mcck_enable() \
326 __set_psw_mask(psw_kernel_bits | PSW_MASK_DAT | PSW_MASK_MCHECK)
327#define local_mcck_disable() \
328 __set_psw_mask(psw_kernel_bits | PSW_MASK_DAT)
329
330/*
307 * Basic Machine Check/Program Check Handler. 331 * Basic Machine Check/Program Check Handler.
308 */ 332 */
309 333