summaryrefslogtreecommitdiffstats
path: root/include/asm-s390/ptrace.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-03 08:14:09 +0100
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-03 08:14:09 +0100
commit27b030d58c8e72fc7a95187a791bd9406e350f02 (patch)
treeab3bab7f39a5ce5bab65578a7e08fa4dfdeb198c /include/asm-s390/ptrace.h
parent79d20b14a0d651f15b0ef9a22b6cf12d284a6d38 (diff)
parent6628465e33ca694bd8fd5c3cf4eb7ff9177bc694 (diff)
downloadop-kernel-dev-27b030d58c8e72fc7a95187a791bd9406e350f02.zip
op-kernel-dev-27b030d58c8e72fc7a95187a791bd9406e350f02.tar.gz
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'include/asm-s390/ptrace.h')
-rw-r--r--include/asm-s390/ptrace.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/asm-s390/ptrace.h b/include/asm-s390/ptrace.h
index 1dc8066..4eff8f2 100644
--- a/include/asm-s390/ptrace.h
+++ b/include/asm-s390/ptrace.h
@@ -185,6 +185,7 @@
#include <linux/stddef.h>
#include <linux/types.h>
#include <asm/setup.h>
+#include <asm/page.h>
typedef union
{
@@ -235,6 +236,7 @@ typedef struct
#define PSW_ADDR_INSN 0x7FFFFFFFUL
#define PSW_BASE_BITS 0x00080000UL
+#define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 20)
#define PSW_ASC_PRIMARY 0x00000000UL
#define PSW_ASC_ACCREG 0x00004000UL
@@ -260,6 +262,7 @@ typedef struct
#define PSW_BASE_BITS 0x0000000180000000UL
#define PSW_BASE32_BITS 0x0000000080000000UL
+#define PSW_DEFAULT_KEY (((unsigned long) PAGE_DEFAULT_ACC) << 52)
#define PSW_ASC_PRIMARY 0x0000000000000000UL
#define PSW_ASC_ACCREG 0x0000400000000000UL
@@ -268,14 +271,15 @@ typedef struct
#define PSW_USER32_BITS (PSW_BASE32_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \
- PSW_MASK_PSTATE)
+ PSW_MASK_PSTATE | PSW_DEFAULT_KEY)
#endif /* __s390x__ */
-#define PSW_KERNEL_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY)
+#define PSW_KERNEL_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_PRIMARY | \
+ PSW_DEFAULT_KEY)
#define PSW_USER_BITS (PSW_BASE_BITS | PSW_MASK_DAT | PSW_ASC_HOME | \
PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK | \
- PSW_MASK_PSTATE)
+ PSW_MASK_PSTATE | PSW_DEFAULT_KEY)
/* This macro merges a NEW PSW mask specified by the user into
the currently active PSW mask CURRENT, modifying only those
@@ -470,6 +474,12 @@ struct user_regs_struct
extern void show_regs(struct pt_regs * regs);
#endif
+static inline void
+psw_set_key(unsigned int key)
+{
+ asm volatile ( "spka 0(%0)" : : "d" (key) );
+}
+
#endif /* __ASSEMBLY__ */
#endif /* _S390_PTRACE_H */
OpenPOWER on IntegriCloud