Commit fd00a34e authored by David Mosberger's avatar David Mosberger

ia64: Merge patch by Arun Sharma: hook up lots of ia32 syscalls.

parent 77ab58e5
...@@ -434,50 +434,55 @@ ia32_syscall_table: ...@@ -434,50 +434,55 @@ ia32_syscall_table:
data8 sys_ni_syscall /* reserved for Security */ data8 sys_ni_syscall /* reserved for Security */
data8 sys_gettid data8 sys_gettid
data8 sys_readahead /* 225 */ data8 sys_readahead /* 225 */
data8 sys_ni_syscall data8 sys_setxattr
data8 sys_ni_syscall data8 sys_lsetxattr
data8 sys_ni_syscall data8 sys_fsetxattr
data8 sys_ni_syscall data8 sys_getxattr
data8 sys_ni_syscall /* 230 */ data8 sys_lgetxattr /* 230 */
data8 sys_ni_syscall data8 sys_fgetxattr
data8 sys_ni_syscall data8 sys_listxattr
data8 sys_ni_syscall data8 sys_llistxattr
data8 sys_ni_syscall data8 sys_flistxattr
data8 sys_ni_syscall /* 235 */ data8 sys_removexattr /* 235 */
data8 sys_ni_syscall data8 sys_lremovexattr
data8 sys_ni_syscall data8 sys_fremovexattr
data8 sys_tkill data8 sys_tkill
data8 sys_ni_syscall data8 sys_sendfile64
data8 compat_sys_futex /* 240 */ data8 compat_sys_futex /* 240 */
data8 compat_sys_sched_setaffinity data8 compat_sys_sched_setaffinity
data8 compat_sys_sched_getaffinity data8 compat_sys_sched_getaffinity
data8 sys32_set_thread_area data8 sys32_set_thread_area
data8 sys32_get_thread_area data8 sys32_get_thread_area
data8 sys_ni_syscall /* 245 */ data8 compat_sys_io_setup /* 245 */
data8 sys_ni_syscall data8 sys_io_destroy
data8 sys_ni_syscall data8 compat_sys_io_getevents
data8 sys_ni_syscall data8 compat_sys_io_submit
data8 sys_ni_syscall data8 sys_io_cancel
data8 sys_ni_syscall /* 250 */ data8 sys_fadvise64 /* 250 */
data8 sys_ni_syscall data8 sys_ni_syscall
data8 sys_exit_group data8 sys_exit_group
data8 sys_ni_syscall data8 sys_lookup_dcookie
data8 sys_epoll_create data8 sys_epoll_create
data8 sys32_epoll_ctl /* 255 */ data8 sys32_epoll_ctl /* 255 */
data8 sys32_epoll_wait data8 sys32_epoll_wait
data8 sys_remap_file_pages data8 sys_remap_file_pages
data8 sys_set_tid_address data8 sys_set_tid_address
data8 sys_ni_syscall data8 sys32_timer_create
data8 sys_ni_syscall /* 260 */ data8 compat_timer_settime /* 260 */
data8 sys_ni_syscall data8 compat_timer_gettime
data8 sys_ni_syscall data8 sys_timer_getoverrun
data8 sys_ni_syscall data8 sys_timer_delete
data8 sys_ni_syscall data8 compat_clock_settime
data8 sys_ni_syscall /* 265 */ data8 compat_clock_gettime /* 265 */
data8 sys_ni_syscall data8 compat_clock_getres
data8 sys_ni_syscall data8 compat_clock_nanosleep
data8 sys_statfs64 data8 sys_statfs64
data8 sys_fstatfs64 data8 sys_fstatfs64
data8 sys_tgkill /* 270 */
data8 compat_sys_utimes
data8 sys32_fadvise64_64
data8 sys_ni_syscall
data8 sys_ni_syscall
// guard against failures to increase IA32_NR_syscalls // guard against failures to increase IA32_NR_syscalls
.org ia32_syscall_table + 8*IA32_NR_syscalls .org ia32_syscall_table + 8*IA32_NR_syscalls
...@@ -199,6 +199,8 @@ typedef union sigval32 { ...@@ -199,6 +199,8 @@ typedef union sigval32 {
unsigned int sival_ptr; unsigned int sival_ptr;
} sigval_t32; } sigval_t32;
#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
typedef struct siginfo32 { typedef struct siginfo32 {
int si_signo; int si_signo;
int si_errno; int si_errno;
...@@ -251,6 +253,19 @@ typedef struct siginfo32 { ...@@ -251,6 +253,19 @@ typedef struct siginfo32 {
} _sifields; } _sifields;
} siginfo_t32; } siginfo_t32;
typedef struct sigevent32 {
sigval_t32 sigev_value;
int sigev_signo;
int sigev_notify;
union {
int _pad[SIGEV_PAD_SIZE32];
struct {
u32 _function;
u32 _attribute; /* really pthread_attr_t */
} _sigev_thread;
} _sigev_un;
} sigevent_t32;
struct old_linux32_dirent { struct old_linux32_dirent {
u32 d_ino; u32 d_ino;
u32 d_offset; u32 d_offset;
......
...@@ -2912,6 +2912,54 @@ sys32_get_thread_area (struct ia32_user_desc *u_info) ...@@ -2912,6 +2912,54 @@ sys32_get_thread_area (struct ia32_user_desc *u_info)
return 0; return 0;
} }
extern asmlinkage long
sys_timer_create(clockid_t which_clock, struct sigevent *timer_event_spec,
timer_t * created_timer_id);
asmlinkage long
sys32_timer_create(u32 clock, struct sigevent32 *se32, timer_t *timer_id)
{
struct sigevent se;
mm_segment_t oldfs;
timer_t t;
long err;
if (se32 == NULL)
return sys_timer_create(clock, NULL, timer_id);
memset(&se, 0, sizeof(struct sigevent));
if (get_user(se.sigev_value.sival_int, &se32->sigev_value.sival_int) ||
__get_user(se.sigev_signo, &se32->sigev_signo) ||
__get_user(se.sigev_notify, &se32->sigev_notify) ||
__copy_from_user(&se._sigev_un._pad, &se32->_sigev_un._pad,
sizeof(se._sigev_un._pad)))
return -EFAULT;
if (!access_ok(VERIFY_WRITE,timer_id,sizeof(timer_t)))
return -EFAULT;
oldfs = get_fs();
set_fs(KERNEL_DS);
err = sys_timer_create(clock, &se, &t);
set_fs(oldfs);
if (!err)
err = __put_user (t, timer_id);
return err;
}
extern long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice);
long sys32_fadvise64_64(int fd, __u32 offset_low, __u32 offset_high,
__u32 len_low, __u32 len_high, int advice)
{
return sys_fadvise64_64(fd,
(((u64)offset_high)<<32) | offset_low,
(((u64)len_high)<<32) | len_low,
advice);
}
#ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */ #ifdef NOTYET /* UNTESTED FOR IA64 FROM HERE DOWN */
struct ncp_mount_data32 { struct ncp_mount_data32 {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/signal.h> #include <asm/signal.h>
#define IA32_NR_syscalls 270 /* length of syscall table */ #define IA32_NR_syscalls 275 /* length of syscall table */
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment