sparc: get rid of remaining SIGN... wrappers

just convert compat_sys_{readahead,fadvise64,fadvise64_64} to
COMPAT_SYSCALL_DEFINE

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2018-03-19 21:08:33 -04:00
Родитель dd19958ce8
Коммит a00a700bde
4 изменённых файлов: 18 добавлений и 52 удалений

Просмотреть файл

@ -13,34 +13,6 @@
.text
#define SIGN1(STUB,SYSCALL,REG1) \
.align 32; \
.globl STUB; \
STUB: sethi %hi(SYSCALL), %g1; \
jmpl %g1 + %lo(SYSCALL), %g0; \
sra REG1, 0, REG1
#define SIGN2(STUB,SYSCALL,REG1,REG2) \
.align 32; \
.globl STUB; \
STUB: sethi %hi(SYSCALL), %g1; \
sra REG1, 0, REG1; \
jmpl %g1 + %lo(SYSCALL), %g0; \
sra REG2, 0, REG2
#define SIGN3(STUB,SYSCALL,REG1,REG2,REG3) \
.align 32; \
.globl STUB; \
STUB: sra REG1, 0, REG1; \
sethi %hi(SYSCALL), %g1; \
sra REG2, 0, REG2; \
jmpl %g1 + %lo(SYSCALL), %g0; \
sra REG3, 0, REG3
SIGN1(sys32_readahead, compat_sys_readahead, %o0)
SIGN2(sys32_fadvise64, compat_sys_fadvise64, %o0, %o4)
SIGN2(sys32_fadvise64_64, compat_sys_fadvise64_64, %o0, %o5)
.globl sys32_mmap2
sys32_mmap2:
sethi %hi(sys_mmap), %g1

Просмотреть файл

@ -212,30 +212,24 @@ asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd,
return sys_pwrite64(fd, ubuf, count, (poshi << 32) | poslo);
}
asmlinkage long compat_sys_readahead(int fd,
unsigned long offhi,
unsigned long offlo,
compat_size_t count)
COMPAT_SYSCALL_DEFINE4(readahead, int, fd, u32, offhi, u32, offlo,
compat_size_t, count)
{
return sys_readahead(fd, (offhi << 32) | offlo, count);
return sys_readahead(fd, ((u64)offhi << 32) | offlo, count);
}
long compat_sys_fadvise64(int fd,
unsigned long offhi,
unsigned long offlo,
compat_size_t len, int advice)
COMPAT_SYSCALL_DEFINE5(fadvise64, int, fd, u32, offhi, u32, offlo,
compat_size_t, len, int, advice)
{
return sys_fadvise64_64(fd, (offhi << 32) | offlo, len, advice);
return sys_fadvise64_64(fd, ((u64)offhi << 32) | offlo, len, advice);
}
long compat_sys_fadvise64_64(int fd,
unsigned long offhi, unsigned long offlo,
unsigned long lenhi, unsigned long lenlo,
int advice)
COMPAT_SYSCALL_DEFINE6(fadvise64_64, int, fd, u32, offhi, u32, offlo,
u32, lenhi, u32, lenlo, int, advice)
{
return sys_fadvise64_64(fd,
(offhi << 32) | offlo,
(lenhi << 32) | lenlo,
((u64)offhi << 32) | offlo,
((u64)lenhi << 32) | lenlo,
advice);
}

Просмотреть файл

@ -77,16 +77,16 @@ asmlinkage compat_ssize_t sys32_pwrite64(unsigned int fd,
unsigned long poshi,
unsigned long poslo);
asmlinkage long compat_sys_readahead(int fd,
unsigned long offhi,
unsigned long offlo,
unsigned offhi,
unsigned offlo,
compat_size_t count);
long compat_sys_fadvise64(int fd,
unsigned long offhi,
unsigned long offlo,
unsigned offhi,
unsigned offlo,
compat_size_t len, int advice);
long compat_sys_fadvise64_64(int fd,
unsigned long offhi, unsigned long offlo,
unsigned long lenhi, unsigned long lenlo,
unsigned offhi, unsigned offlo,
unsigned lenhi, unsigned lenlo,
int advice);
long sys32_sync_file_range(unsigned int fd,
unsigned long off_high, unsigned long off_low,

Просмотреть файл

@ -60,8 +60,8 @@ sys_call_table32:
/*190*/ .word sys_init_module, sys_sparc64_personality, sys_remap_file_pages, sys_epoll_create, sys_epoll_ctl
.word sys_epoll_wait, sys_ioprio_set, sys_getppid, compat_sys_sparc_sigaction, sys_sgetmask
/*200*/ .word sys_ssetmask, sys_sigsuspend, compat_sys_newlstat, sys_uselib, compat_sys_old_readdir
.word sys32_readahead, sys32_socketcall, sys_syslog, compat_sys_lookup_dcookie, sys32_fadvise64
/*210*/ .word sys32_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, compat_sys_sysinfo
.word compat_sys_readahead, sys32_socketcall, sys_syslog, compat_sys_lookup_dcookie, compat_sys_fadvise64
/*210*/ .word compat_sys_fadvise64_64, sys_tgkill, sys_waitpid, sys_swapoff, compat_sys_sysinfo
.word compat_sys_ipc, sys32_sigreturn, sys_clone, sys_ioprio_get, compat_sys_adjtimex
/*220*/ .word compat_sys_sigprocmask, sys_ni_syscall, sys_delete_module, sys_ni_syscall, sys_getpgid
.word sys_bdflush, sys_sysfs, sys_nis_syscall, sys_setfsuid16, sys_setfsgid16