Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5383d2c8
Commit
5383d2c8
authored
Feb 26, 2014
by
Heiko Carstens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s390/compat: convert to COMPAT_SYSCALL_DEFINEx part 7
Signed-off-by:
Heiko Carstens
<
heiko.carstens@de.ibm.com
>
parent
a0f8c6da
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
42 deletions
+13
-42
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_linux.c
+5
-7
arch/s390/kernel/compat_linux.h
arch/s390/kernel/compat_linux.h
+4
-7
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/compat_wrapper.S
+0
-24
arch/s390/kernel/syscalls.S
arch/s390/kernel/syscalls.S
+4
-4
No files found.
arch/s390/kernel/compat_linux.c
View file @
5383d2c8
...
...
@@ -454,7 +454,7 @@ COMPAT_SYSCALL_DEFINE1(s390_mmap2, struct mmap_arg_struct_emu31 __user *, arg)
return
sys_mmap_pgoff
(
a
.
addr
,
a
.
len
,
a
.
prot
,
a
.
flags
,
a
.
fd
,
a
.
offset
);
}
asmlinkage
long
sys32_read
(
unsigned
int
fd
,
char
__user
*
buf
,
size_t
count
)
COMPAT_SYSCALL_DEFINE3
(
s390_read
,
unsigned
int
,
fd
,
char
__user
*
,
buf
,
compat_size_t
,
count
)
{
if
((
compat_ssize_t
)
count
<
0
)
return
-
EINVAL
;
...
...
@@ -462,7 +462,7 @@ asmlinkage long sys32_read(unsigned int fd, char __user * buf, size_t count)
return
sys_read
(
fd
,
buf
,
count
);
}
asmlinkage
long
sys32_write
(
unsigned
int
fd
,
const
char
__user
*
buf
,
size_t
count
)
COMPAT_SYSCALL_DEFINE3
(
s390_write
,
unsigned
int
,
fd
,
const
char
__user
*
,
buf
,
compat_size_t
,
count
)
{
if
((
compat_ssize_t
)
count
<
0
)
return
-
EINVAL
;
...
...
@@ -476,14 +476,13 @@ asmlinkage long sys32_write(unsigned int fd, const char __user * buf, size_t cou
* because the 31 bit values differ from the 64 bit values.
*/
asmlinkage
long
sys32_fadvise64
(
int
fd
,
loff_t
offset
,
size_t
len
,
int
advise
)
COMPAT_SYSCALL_DEFINE5
(
s390_fadvise64
,
int
,
fd
,
u32
,
high
,
u32
,
low
,
compat_size_t
,
len
,
int
,
advise
)
{
if
(
advise
==
4
)
advise
=
POSIX_FADV_DONTNEED
;
else
if
(
advise
==
5
)
advise
=
POSIX_FADV_NOREUSE
;
return
sys_fadvise64
(
fd
,
offset
,
len
,
advise
);
return
sys_fadvise64
(
fd
,
(
unsigned
long
)
high
<<
32
|
low
,
len
,
advise
);
}
struct
fadvise64_64_args
{
...
...
@@ -493,8 +492,7 @@ struct fadvise64_64_args {
int
advice
;
};
asmlinkage
long
sys32_fadvise64_64
(
struct
fadvise64_64_args
__user
*
args
)
COMPAT_SYSCALL_DEFINE1
(
s390_fadvise64_64
,
struct
fadvise64_64_args
__user
*
,
args
)
{
struct
fadvise64_64_args
a
;
...
...
arch/s390/kernel/compat_linux.h
View file @
5383d2c8
...
...
@@ -97,9 +97,6 @@ long compat_sys_s390_getgid16(void);
long
compat_sys_s390_getegid16
(
void
);
long
compat_sys_s390_truncate64
(
const
char
__user
*
path
,
u32
high
,
u32
low
);
long
compat_sys_s390_ftruncate64
(
unsigned
int
fd
,
u32
high
,
u32
low
);
long
sys32_init_module
(
void
__user
*
umod
,
unsigned
long
len
,
const
char
__user
*
uargs
);
long
sys32_delete_module
(
const
char
__user
*
name_user
,
unsigned
int
flags
);
long
compat_sys_s390_pread64
(
unsigned
int
fd
,
char
__user
*
ubuf
,
compat_size_t
count
,
u32
high
,
u32
low
);
long
compat_sys_s390_pwrite64
(
unsigned
int
fd
,
const
char
__user
*
ubuf
,
compat_size_t
count
,
u32
high
,
u32
low
);
long
compat_sys_s390_readahead
(
int
fd
,
u32
high
,
u32
low
,
s32
count
);
...
...
@@ -109,8 +106,8 @@ long compat_sys_s390_fstat64(unsigned int fd, struct stat64_emu31 __user *statbu
long
compat_sys_s390_fstatat64
(
unsigned
int
dfd
,
const
char
__user
*
filename
,
struct
stat64_emu31
__user
*
statbuf
,
int
flag
);
long
compat_sys_s390_old_mmap
(
struct
mmap_arg_struct_emu31
__user
*
arg
);
long
compat_sys_s390_mmap2
(
struct
mmap_arg_struct_emu31
__user
*
arg
);
long
sys32_read
(
unsigned
int
fd
,
char
__user
*
buf
,
size_t
count
);
long
sys32_write
(
unsigned
int
fd
,
const
char
__user
*
buf
,
size_t
count
);
long
sys32_fadvise64
(
int
fd
,
loff_t
offset
,
size_t
len
,
int
advise
);
long
sys32
_fadvise64_64
(
struct
fadvise64_64_args
__user
*
args
);
long
compat_sys_s390_read
(
unsigned
int
fd
,
char
__user
*
buf
,
compat_
size_t
count
);
long
compat_sys_s390_write
(
unsigned
int
fd
,
const
char
__user
*
buf
,
compat_
size_t
count
);
long
compat_sys_s390_fadvise64
(
int
fd
,
u32
high
,
u32
low
,
compat_
size_t
len
,
int
advise
);
long
compat_sys_s390
_fadvise64_64
(
struct
fadvise64_64_args
__user
*
args
);
#endif
/* _ASM_S390X_S390_H */
arch/s390/kernel/compat_wrapper.S
View file @
5383d2c8
...
...
@@ -12,18 +12,6 @@ ENTRY(sys32_exit_wrapper)
lgfr
%
r2
,%
r2
#
int
jg
sys_exit
#
branch
to
sys_exit
ENTRY
(
sys32_read_wrapper
)
llgfr
%
r2
,%
r2
#
unsigned
int
llgtr
%
r3
,%
r3
#
char
*
llgfr
%
r4
,%
r4
#
size_t
jg
sys32_read
#
branch
to
sys_read
ENTRY
(
sys32_write_wrapper
)
llgfr
%
r2
,%
r2
#
unsigned
int
llgtr
%
r3
,%
r3
#
const
char
*
llgfr
%
r4
,%
r4
#
size_t
jg
sys32_write
#
branch
to
system
call
ENTRY
(
sys32_close_wrapper
)
llgfr
%
r2
,%
r2
#
unsigned
int
jg
sys_close
#
branch
to
system
call
...
...
@@ -777,18 +765,6 @@ ENTRY(sys_epoll_wait_wrapper)
lgfr
%
r5
,%
r5
#
int
jg
sys_epoll_wait
#
branch
to
system
call
ENTRY
(
sys32_fadvise64_wrapper
)
lgfr
%
r2
,%
r2
#
int
sllg
%
r3
,%
r3
,
32
#
get
high
word
of
64
bit
loff_t
or
%
r3
,%
r4
#
get
low
word
of
64
bit
loff_t
llgfr
%
r4
,%
r5
#
size_t
(
unsigned
long
)
lgfr
%
r5
,%
r6
#
int
jg
sys32_fadvise64
ENTRY
(
sys32_fadvise64_64_wrapper
)
llgtr
%
r2
,%
r2
#
struct
fadvise64_64_args
*
jg
sys32_fadvise64_64
ENTRY
(
sys32_clock_settime_wrapper
)
lgfr
%
r2
,%
r2
#
clockid_t
(
int
)
llgtr
%
r3
,%
r3
#
struct
compat_timespec
*
...
...
arch/s390/kernel/syscalls.S
View file @
5383d2c8
...
...
@@ -11,8 +11,8 @@
NI_SYSCALL
/
*
0
*/
SYSCALL
(
sys_exit
,
sys_exit
,
sys32_exit_wrapper
)
SYSCALL
(
sys_fork
,
sys_fork
,
sys_fork
)
SYSCALL
(
sys_read
,
sys_read
,
sys32_read_wrapper
)
SYSCALL
(
sys_write
,
sys_write
,
sys32_write_wrapper
)
SYSCALL
(
sys_read
,
sys_read
,
compat_sys_s390_read
)
SYSCALL
(
sys_write
,
sys_write
,
compat_sys_s390_write
)
SYSCALL
(
sys_open
,
sys_open
,
compat_sys_open
)
/
*
5
*/
SYSCALL
(
sys_close
,
sys_close
,
sys32_close_wrapper
)
SYSCALL
(
sys_restart_syscall
,
sys_restart_syscall
,
sys_restart_syscall
)
...
...
@@ -261,7 +261,7 @@ SYSCALL(sys_epoll_create,sys_epoll_create,sys_epoll_create_wrapper)
SYSCALL
(
sys_epoll_ctl
,
sys_epoll_ctl
,
sys_epoll_ctl_wrapper
)
/
*
250
*/
SYSCALL
(
sys_epoll_wait
,
sys_epoll_wait
,
sys_epoll_wait_wrapper
)
SYSCALL
(
sys_set_tid_address
,
sys_set_tid_address
,
sys32_set_tid_address_wrapper
)
SYSCALL
(
sys_s390_fadvise64
,
sys_fadvise64_64
,
sys32_fadvise64_wrapper
)
SYSCALL
(
sys_s390_fadvise64
,
sys_fadvise64_64
,
compat_sys_s390_fadvise64
)
SYSCALL
(
sys_timer_create
,
sys_timer_create
,
sys32_timer_create_wrapper
)
SYSCALL
(
sys_timer_settime
,
sys_timer_settime
,
sys32_timer_settime_wrapper
)
/
*
255
*/
SYSCALL
(
sys_timer_gettime
,
sys_timer_gettime
,
sys32_timer_gettime_wrapper
)
...
...
@@ -272,7 +272,7 @@ SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260
SYSCALL
(
sys_clock_getres
,
sys_clock_getres
,
sys32_clock_getres_wrapper
)
SYSCALL
(
sys_clock_nanosleep
,
sys_clock_nanosleep
,
sys32_clock_nanosleep_wrapper
)
NI_SYSCALL
/
*
reserved
for
vserver
*/
SYSCALL
(
sys_s390_fadvise64_64
,
sys_ni_syscall
,
sys32_fadvise64_64_wrapper
)
SYSCALL
(
sys_s390_fadvise64_64
,
sys_ni_syscall
,
compat_sys_s390_fadvise64_64
)
SYSCALL
(
sys_statfs64
,
sys_statfs64
,
compat_sys_statfs64_wrapper
)
SYSCALL
(
sys_fstatfs64
,
sys_fstatfs64
,
compat_sys_fstatfs64_wrapper
)
SYSCALL
(
sys_remap_file_pages
,
sys_remap_file_pages
,
sys32_remap_file_pages_wrapper
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment