Skip to content

Commit fcdc03f

Browse files
committed
s390/compat: cleanup compat_linux.h header file
Remove various declarations from former s390 specific compat system calls which have been removed with commit fef747b ("s390: use generic UID16 implementation"). While at it clean up the whole small header file. Signed-off-by: Heiko Carstens <[email protected]>
1 parent 29b06ad commit fcdc03f

File tree

1 file changed

+28
-52
lines changed

1 file changed

+28
-52
lines changed

arch/s390/kernel/compat_linux.h

Lines changed: 28 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,69 @@
77
#include <linux/syscalls.h>
88
#include <asm/ptrace.h>
99

10-
/* Macro that masks the high order bit of an 32 bit pointer and converts it*/
11-
/* to a 64 bit pointer */
12-
#define A(__x) ((unsigned long)((__x) & 0x7FFFFFFFUL))
13-
#define AA(__x) \
14-
((unsigned long)(__x))
10+
/*
11+
* Macro that masks the high order bit of a 32 bit pointer and
12+
* converts it to a 64 bit pointer.
13+
*/
14+
#define A(__x) ((unsigned long)((__x) & 0x7FFFFFFFUL))
15+
#define AA(__x) ((unsigned long)(__x))
1516

1617
/* Now 32bit compatibility types */
1718
struct ipc_kludge_32 {
18-
__u32 msgp; /* pointer */
19-
__s32 msgtyp;
19+
__u32 msgp; /* pointer */
20+
__s32 msgtyp;
2021
};
2122

2223
/* asm/sigcontext.h */
23-
typedef union
24-
{
25-
__u64 d;
26-
__u32 f;
24+
typedef union {
25+
__u64 d;
26+
__u32 f;
2727
} freg_t32;
2828

29-
typedef struct
30-
{
29+
typedef struct {
3130
unsigned int fpc;
3231
unsigned int pad;
33-
freg_t32 fprs[__NUM_FPRS];
32+
freg_t32 fprs[__NUM_FPRS];
3433
} _s390_fp_regs32;
3534

36-
typedef struct
37-
{
35+
typedef struct {
3836
psw_t32 psw;
3937
__u32 gprs[__NUM_GPRS];
4038
__u32 acrs[__NUM_ACRS];
4139
} _s390_regs_common32;
4240

43-
typedef struct
44-
{
41+
typedef struct {
4542
_s390_regs_common32 regs;
46-
_s390_fp_regs32 fpregs;
43+
_s390_fp_regs32 fpregs;
4744
} _sigregs32;
4845

49-
typedef struct
50-
{
51-
__u32 gprs_high[__NUM_GPRS];
52-
__u64 vxrs_low[__NUM_VXRS_LOW];
53-
__vector128 vxrs_high[__NUM_VXRS_HIGH];
54-
__u8 __reserved[128];
46+
typedef struct {
47+
__u32 gprs_high[__NUM_GPRS];
48+
__u64 vxrs_low[__NUM_VXRS_LOW];
49+
__vector128 vxrs_high[__NUM_VXRS_HIGH];
50+
__u8 __reserved[128];
5551
} _sigregs_ext32;
5652

5753
#define _SIGCONTEXT_NSIG32 64
5854
#define _SIGCONTEXT_NSIG_BPW32 32
5955
#define __SIGNAL_FRAMESIZE32 96
60-
#define _SIGMASK_COPY_SIZE32 (sizeof(u32)*2)
56+
#define _SIGMASK_COPY_SIZE32 (sizeof(u32) * 2)
6157

62-
struct sigcontext32
63-
{
58+
struct sigcontext32 {
6459
__u32 oldmask[_COMPAT_NSIG_WORDS];
65-
__u32 sregs; /* pointer */
60+
__u32 sregs; /* pointer */
6661
};
6762

6863
/* asm/signal.h */
6964

7065
/* asm/ucontext.h */
7166
struct ucontext32 {
7267
__u32 uc_flags;
73-
__u32 uc_link; /* pointer */
68+
__u32 uc_link; /* pointer */
7469
compat_stack_t uc_stack;
7570
_sigregs32 uc_mcontext;
7671
compat_sigset_t uc_sigmask;
77-
/* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */
72+
/* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */
7873
unsigned char __unused[128 - sizeof(compat_sigset_t)];
7974
_sigregs_ext32 uc_mcontext_ext;
8075
};
@@ -83,25 +78,6 @@ struct stat64_emu31;
8378
struct mmap_arg_struct_emu31;
8479
struct fadvise64_64_args;
8580

86-
long compat_sys_s390_chown16(const char __user *filename, u16 user, u16 group);
87-
long compat_sys_s390_lchown16(const char __user *filename, u16 user, u16 group);
88-
long compat_sys_s390_fchown16(unsigned int fd, u16 user, u16 group);
89-
long compat_sys_s390_setregid16(u16 rgid, u16 egid);
90-
long compat_sys_s390_setgid16(u16 gid);
91-
long compat_sys_s390_setreuid16(u16 ruid, u16 euid);
92-
long compat_sys_s390_setuid16(u16 uid);
93-
long compat_sys_s390_setresuid16(u16 ruid, u16 euid, u16 suid);
94-
long compat_sys_s390_getresuid16(u16 __user *ruid, u16 __user *euid, u16 __user *suid);
95-
long compat_sys_s390_setresgid16(u16 rgid, u16 egid, u16 sgid);
96-
long compat_sys_s390_getresgid16(u16 __user *rgid, u16 __user *egid, u16 __user *sgid);
97-
long compat_sys_s390_setfsuid16(u16 uid);
98-
long compat_sys_s390_setfsgid16(u16 gid);
99-
long compat_sys_s390_getgroups16(int gidsetsize, u16 __user *grouplist);
100-
long compat_sys_s390_setgroups16(int gidsetsize, u16 __user *grouplist);
101-
long compat_sys_s390_getuid16(void);
102-
long compat_sys_s390_geteuid16(void);
103-
long compat_sys_s390_getgid16(void);
104-
long compat_sys_s390_getegid16(void);
10581
long compat_sys_s390_truncate64(const char __user *path, u32 high, u32 low);
10682
long compat_sys_s390_ftruncate64(unsigned int fd, u32 high, u32 low);
10783
long compat_sys_s390_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, u32 high, u32 low);
@@ -113,8 +89,8 @@ long compat_sys_s390_fstat64(unsigned int fd, struct stat64_emu31 __user *statbu
11389
long compat_sys_s390_fstatat64(unsigned int dfd, const char __user *filename, struct stat64_emu31 __user *statbuf, int flag);
11490
long compat_sys_s390_old_mmap(struct mmap_arg_struct_emu31 __user *arg);
11591
long compat_sys_s390_mmap2(struct mmap_arg_struct_emu31 __user *arg);
116-
long compat_sys_s390_read(unsigned int fd, char __user * buf, compat_size_t count);
117-
long compat_sys_s390_write(unsigned int fd, const char __user * buf, compat_size_t count);
92+
long compat_sys_s390_read(unsigned int fd, char __user *buf, compat_size_t count);
93+
long compat_sys_s390_write(unsigned int fd, const char __user *buf, compat_size_t count);
11894
long compat_sys_s390_fadvise64(int fd, u32 high, u32 low, compat_size_t len, int advise);
11995
long compat_sys_s390_fadvise64_64(struct fadvise64_64_args __user *args);
12096
long compat_sys_s390_sync_file_range(int fd, u32 offhigh, u32 offlow, u32 nhigh, u32 nlow, unsigned int flags);

0 commit comments

Comments
 (0)