aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-21 23:15:25 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-03-03 23:00:27 -0500
commit56e41d3c5aa84d679eebdb3cb8a70b03c5fbd6c3 (patch)
tree62ede9a6cc31ed46d78632b65c4a66485fd5d1ad /arch/x86
parentd5dc77bfeeab0b03a32e3db5e31e2f64605634ab (diff)
merge compat sys_ipc instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/ia32/Makefile3
-rw-r--r--arch/x86/ia32/ipc32.c54
-rw-r--r--arch/x86/include/asm/sys_ia32.h3
-rw-r--r--arch/x86/syscalls/syscall_32.tbl2
4 files changed, 1 insertions, 61 deletions
diff --git a/arch/x86/ia32/Makefile b/arch/x86/ia32/Makefile
index 455646e0e532..e785b422b766 100644
--- a/arch/x86/ia32/Makefile
+++ b/arch/x86/ia32/Makefile
@@ -5,9 +5,6 @@
5obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o 5obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_signal.o
6obj-$(CONFIG_IA32_EMULATION) += nosyscall.o syscall_ia32.o 6obj-$(CONFIG_IA32_EMULATION) += nosyscall.o syscall_ia32.o
7 7
8sysv-$(CONFIG_SYSVIPC) := ipc32.o
9obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
10
11obj-$(CONFIG_IA32_AOUT) += ia32_aout.o 8obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
12 9
13audit-class-$(CONFIG_AUDIT) := audit.o 10audit-class-$(CONFIG_AUDIT) := audit.o
diff --git a/arch/x86/ia32/ipc32.c b/arch/x86/ia32/ipc32.c
deleted file mode 100644
index 29cdcd02ead3..000000000000
--- a/arch/x86/ia32/ipc32.c
+++ /dev/null
@@ -1,54 +0,0 @@
1#include <linux/kernel.h>
2#include <linux/spinlock.h>
3#include <linux/list.h>
4#include <linux/syscalls.h>
5#include <linux/time.h>
6#include <linux/sem.h>
7#include <linux/msg.h>
8#include <linux/shm.h>
9#include <linux/ipc.h>
10#include <linux/compat.h>
11#include <asm/sys_ia32.h>
12
13asmlinkage long sys32_ipc(u32 call, int first, int second, int third,
14 compat_uptr_t ptr, u32 fifth)
15{
16 int version;
17
18 version = call >> 16; /* hack for backward compatibility */
19 call &= 0xffff;
20
21 switch (call) {
22 case SEMOP:
23 /* struct sembuf is the same on 32 and 64bit :)) */
24 return sys_semtimedop(first, compat_ptr(ptr), second, NULL);
25 case SEMTIMEDOP:
26 return compat_sys_semtimedop(first, compat_ptr(ptr), second,
27 compat_ptr(fifth));
28 case SEMGET:
29 return sys_semget(first, second, third);
30 case SEMCTL:
31 return compat_sys_semctl(first, second, third, compat_ptr(ptr));
32
33 case MSGSND:
34 return compat_sys_msgsnd(first, second, third, compat_ptr(ptr));
35 case MSGRCV:
36 return compat_sys_msgrcv(first, second, fifth, third,
37 version, compat_ptr(ptr));
38 case MSGGET:
39 return sys_msgget((key_t) first, second);
40 case MSGCTL:
41 return compat_sys_msgctl(first, second, compat_ptr(ptr));
42
43 case SHMAT:
44 return compat_sys_shmat(first, second, third, version,
45 compat_ptr(ptr));
46 case SHMDT:
47 return sys_shmdt(compat_ptr(ptr));
48 case SHMGET:
49 return sys_shmget(first, (unsigned)second, third);
50 case SHMCTL:
51 return compat_sys_shmctl(first, second, compat_ptr(ptr));
52 }
53 return -ENOSYS;
54}
diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h
index 2b0e0c2d5379..df8ad3b3920a 100644
--- a/arch/x86/include/asm/sys_ia32.h
+++ b/arch/x86/include/asm/sys_ia32.h
@@ -57,9 +57,6 @@ asmlinkage long sys32_fallocate(int, int, unsigned,
57asmlinkage long sys32_sigreturn(void); 57asmlinkage long sys32_sigreturn(void);
58asmlinkage long sys32_rt_sigreturn(void); 58asmlinkage long sys32_rt_sigreturn(void);
59 59
60/* ia32/ipc32.c */
61asmlinkage long sys32_ipc(u32, int, int, int, compat_uptr_t, u32);
62
63asmlinkage long sys32_fanotify_mark(int, unsigned int, u32, u32, int, 60asmlinkage long sys32_fanotify_mark(int, unsigned int, u32, u32, int,
64 const char __user *); 61 const char __user *);
65 62
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl
index 0b55cd773e4c..0f6f5becab0d 100644
--- a/arch/x86/syscalls/syscall_32.tbl
+++ b/arch/x86/syscalls/syscall_32.tbl
@@ -123,7 +123,7 @@
123114 i386 wait4 sys_wait4 compat_sys_wait4 123114 i386 wait4 sys_wait4 compat_sys_wait4
124115 i386 swapoff sys_swapoff 124115 i386 swapoff sys_swapoff
125116 i386 sysinfo sys_sysinfo compat_sys_sysinfo 125116 i386 sysinfo sys_sysinfo compat_sys_sysinfo
126117 i386 ipc sys_ipc sys32_ipc 126117 i386 ipc sys_ipc compat_sys_ipc
127118 i386 fsync sys_fsync 127118 i386 fsync sys_fsync
128119 i386 sigreturn sys_sigreturn stub32_sigreturn 128119 i386 sigreturn sys_sigreturn stub32_sigreturn
129120 i386 clone sys_clone stub32_clone 129120 i386 clone sys_clone stub32_clone