Skip to content

Commit 67a9c42

Browse files
committed
s390/ptrace: move short psw definitions to ptrace header file
The short psw definitions are contained in compat header files, however short psws are not compat specific. Therefore move the definitions to ptrace header file. This also gets rid of a compat header include in kvm code. Acked-by: Vasily Gorbik <[email protected]> Signed-off-by: Heiko Carstens <[email protected]>
1 parent aceb06d commit 67a9c42

File tree

4 files changed

+32
-32
lines changed

4 files changed

+32
-32
lines changed

arch/s390/include/asm/compat.h

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/sched.h>
99
#include <linux/sched/task_stack.h>
1010
#include <linux/thread_info.h>
11+
#include <asm/ptrace.h>
1112

1213
#define compat_mode_t compat_mode_t
1314
typedef u16 compat_mode_t;
@@ -22,32 +23,8 @@ typedef u16 compat_mode_t;
2223
(__force t)(__TYPE_IS_PTR(t) ? ((v) & 0x7fffffff) : (v)); \
2324
})
2425

25-
#define PSW32_MASK_PER 0x40000000UL
26-
#define PSW32_MASK_DAT 0x04000000UL
27-
#define PSW32_MASK_IO 0x02000000UL
28-
#define PSW32_MASK_EXT 0x01000000UL
29-
#define PSW32_MASK_KEY 0x00F00000UL
30-
#define PSW32_MASK_BASE 0x00080000UL /* Always one */
31-
#define PSW32_MASK_MCHECK 0x00040000UL
32-
#define PSW32_MASK_WAIT 0x00020000UL
33-
#define PSW32_MASK_PSTATE 0x00010000UL
34-
#define PSW32_MASK_ASC 0x0000C000UL
35-
#define PSW32_MASK_CC 0x00003000UL
36-
#define PSW32_MASK_PM 0x00000f00UL
37-
#define PSW32_MASK_RI 0x00000080UL
38-
3926
#define PSW32_MASK_USER 0x0000FF00UL
4027

41-
#define PSW32_ADDR_AMODE 0x80000000UL
42-
#define PSW32_ADDR_INSN 0x7FFFFFFFUL
43-
44-
#define PSW32_DEFAULT_KEY (((u32) PAGE_DEFAULT_ACC) << 20)
45-
46-
#define PSW32_ASC_PRIMARY 0x00000000UL
47-
#define PSW32_ASC_ACCREG 0x00004000UL
48-
#define PSW32_ASC_SECONDARY 0x00008000UL
49-
#define PSW32_ASC_HOME 0x0000C000UL
50-
5128
#define PSW32_USER_BITS (PSW32_MASK_DAT | PSW32_MASK_IO | PSW32_MASK_EXT | \
5229
PSW32_DEFAULT_KEY | PSW32_MASK_BASE | \
5330
PSW32_MASK_MCHECK | PSW32_MASK_PSTATE | \

arch/s390/include/asm/ptrace.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,35 @@ enum {
7171
&(*(struct psw_bits *)(&(__psw))); \
7272
}))
7373

74+
#define PSW32_MASK_PER 0x40000000UL
75+
#define PSW32_MASK_DAT 0x04000000UL
76+
#define PSW32_MASK_IO 0x02000000UL
77+
#define PSW32_MASK_EXT 0x01000000UL
78+
#define PSW32_MASK_KEY 0x00F00000UL
79+
#define PSW32_MASK_BASE 0x00080000UL /* Always one */
80+
#define PSW32_MASK_MCHECK 0x00040000UL
81+
#define PSW32_MASK_WAIT 0x00020000UL
82+
#define PSW32_MASK_PSTATE 0x00010000UL
83+
#define PSW32_MASK_ASC 0x0000C000UL
84+
#define PSW32_MASK_CC 0x00003000UL
85+
#define PSW32_MASK_PM 0x00000f00UL
86+
#define PSW32_MASK_RI 0x00000080UL
87+
88+
#define PSW32_ADDR_AMODE 0x80000000UL
89+
#define PSW32_ADDR_INSN 0x7FFFFFFFUL
90+
91+
#define PSW32_DEFAULT_KEY (((u32)PAGE_DEFAULT_ACC) << 20)
92+
93+
#define PSW32_ASC_PRIMARY 0x00000000UL
94+
#define PSW32_ASC_ACCREG 0x00004000UL
95+
#define PSW32_ASC_SECONDARY 0x00008000UL
96+
#define PSW32_ASC_HOME 0x0000C000UL
97+
98+
typedef struct {
99+
unsigned int mask;
100+
unsigned int addr;
101+
} psw_t32 __aligned(8);
102+
74103
#define PGM_INT_CODE_MASK 0x7f
75104
#define PGM_INT_CODE_PER 0x80
76105

arch/s390/kernel/compat_linux.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <linux/compat.h>
66
#include <linux/socket.h>
77
#include <linux/syscalls.h>
8+
#include <asm/ptrace.h>
89

910
/* Macro that masks the high order bit of an 32 bit pointer and converts it*/
1011
/* to a 64 bit pointer */
@@ -32,15 +33,9 @@ typedef struct
3233
freg_t32 fprs[__NUM_FPRS];
3334
} _s390_fp_regs32;
3435

35-
typedef struct
36-
{
37-
__u32 mask;
38-
__u32 addr;
39-
} _psw_t32 __attribute__ ((aligned(8)));
40-
4136
typedef struct
4237
{
43-
_psw_t32 psw;
38+
psw_t32 psw;
4439
__u32 gprs[__NUM_GPRS];
4540
__u32 acrs[__NUM_ACRS];
4641
} _s390_regs_common32;

arch/s390/kvm/priv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <linux/kvm.h>
1212
#include <linux/gfp.h>
1313
#include <linux/errno.h>
14-
#include <linux/compat.h>
1514
#include <linux/mm_types.h>
1615
#include <linux/pgtable.h>
1716

0 commit comments

Comments
 (0)