summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/processor.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2012-03-28 17:30:02 (GMT)
committerDavid Howells <dhowells@redhat.com>2012-03-28 17:30:02 (GMT)
commita0616cdebcfd575dcd4c46102d1b52fbb827fc29 (patch)
tree49c67a23f3bcdb72a94317ddeff65e450b574746 /arch/s390/include/asm/processor.h
parentae3a197e3d0bfe3f4bf1693723e82dc018c096f3 (diff)
downloadlinux-a0616cdebcfd575dcd4c46102d1b52fbb827fc29.tar.xz
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 d25843a..d499b30 100644
--- a/arch/s390/include/asm/processor.h
+++ b/arch/s390/include/asm/processor.h
@@ -14,6 +14,7 @@
#define __ASM_S390_PROCESSOR_H
#include <linux/linkage.h>
+#include <linux/irqflags.h>
#include <asm/cpu.h>
#include <asm/page.h>
#include <asm/ptrace.h>
@@ -156,6 +157,14 @@ unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk) (task_pt_regs(tsk)->psw.addr)
#define KSTK_ESP(tsk) (task_pt_regs(tsk)->gprs[15])
+static inline unsigned short stap(void)
+{
+ unsigned short cpu_address;
+
+ asm volatile("stap %0" : "=m" (cpu_address));
+ return cpu_address;
+}
+
/*
* Give up the time slice of the virtual PU.
*/
@@ -304,6 +313,21 @@ static inline void __noreturn disabled_wait(unsigned long code)
}
/*
+ * Use to set psw mask except for the first byte which
+ * won't be changed by this function.
+ */
+static inline void
+__set_psw_mask(unsigned long mask)
+{
+ __load_psw_mask(mask | (arch_local_save_flags() & ~(-1UL >> 8)));
+}
+
+#define local_mcck_enable() \
+ __set_psw_mask(psw_kernel_bits | PSW_MASK_DAT | PSW_MASK_MCHECK)
+#define local_mcck_disable() \
+ __set_psw_mask(psw_kernel_bits | PSW_MASK_DAT)
+
+/*
* Basic Machine Check/Program Check Handler.
*/