aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/unistd.h1
-rw-r--r--arch/m68k/kernel/sys_m68k.c81
2 files changed, 1 insertions, 81 deletions
diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h
index d801154310ea..60b15d0aa072 100644
--- a/arch/m68k/include/asm/unistd.h
+++ b/arch/m68k/include/asm/unistd.h
@@ -351,6 +351,7 @@
351#define __ARCH_WANT_STAT64 351#define __ARCH_WANT_STAT64
352#define __ARCH_WANT_SYS_ALARM 352#define __ARCH_WANT_SYS_ALARM
353#define __ARCH_WANT_SYS_GETHOSTNAME 353#define __ARCH_WANT_SYS_GETHOSTNAME
354#define __ARCH_WANT_SYS_IPC
354#define __ARCH_WANT_SYS_PAUSE 355#define __ARCH_WANT_SYS_PAUSE
355#define __ARCH_WANT_SYS_SGETMASK 356#define __ARCH_WANT_SYS_SGETMASK
356#define __ARCH_WANT_SYS_SIGNAL 357#define __ARCH_WANT_SYS_SIGNAL
diff --git a/arch/m68k/kernel/sys_m68k.c b/arch/m68k/kernel/sys_m68k.c
index 7b309e7b6cef..77896692eb0a 100644
--- a/arch/m68k/kernel/sys_m68k.c
+++ b/arch/m68k/kernel/sys_m68k.c
@@ -46,87 +46,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
46 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); 46 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
47} 47}
48 48
49/*
50 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
51 *
52 * This is really horribly ugly.
53 */
54asmlinkage int sys_ipc (uint call, int first, int second,
55 int third, void __user *ptr, long fifth)
56{
57 int version, ret;
58
59 version = call >> 16; /* hack for backward compatibility */
60 call &= 0xffff;
61
62 if (call <= SEMCTL)
63 switch (call) {
64 case SEMOP:
65 return sys_semop (first, ptr, second);
66 case SEMGET:
67 return sys_semget (first, second, third);
68 case SEMCTL: {
69 union semun fourth;
70 if (!ptr)
71 return -EINVAL;
72 if (get_user(fourth.__pad, (void __user *__user *) ptr))
73 return -EFAULT;
74 return sys_semctl (first, second, third, fourth);
75 }
76 default:
77 return -ENOSYS;
78 }
79 if (call <= MSGCTL)
80 switch (call) {
81 case MSGSND:
82 return sys_msgsnd (first, ptr, second, third);
83 case MSGRCV:
84 switch (version) {
85 case 0: {
86 struct ipc_kludge tmp;
87 if (!ptr)
88 return -EINVAL;
89 if (copy_from_user (&tmp, ptr, sizeof (tmp)))
90 return -EFAULT;
91 return sys_msgrcv (first, tmp.msgp, second,
92 tmp.msgtyp, third);
93 }
94 default:
95 return sys_msgrcv (first, ptr,
96 second, fifth, third);
97 }
98 case MSGGET:
99 return sys_msgget ((key_t) first, second);
100 case MSGCTL:
101 return sys_msgctl (first, second, ptr);
102 default:
103 return -ENOSYS;
104 }
105 if (call <= SHMCTL)
106 switch (call) {
107 case SHMAT:
108 switch (version) {
109 default: {
110 ulong raddr;
111 ret = do_shmat (first, ptr, second, &raddr);
112 if (ret)
113 return ret;
114 return put_user (raddr, (ulong __user *) third);
115 }
116 }
117 case SHMDT:
118 return sys_shmdt (ptr);
119 case SHMGET:
120 return sys_shmget (first, second, third);
121 case SHMCTL:
122 return sys_shmctl (first, second, ptr);
123 default:
124 return -ENOSYS;
125 }
126
127 return -EINVAL;
128}
129
130/* Convert virtual (user) address VADDR to physical address PADDR */ 49/* Convert virtual (user) address VADDR to physical address PADDR */
131#define virt_to_phys_040(vaddr) \ 50#define virt_to_phys_040(vaddr) \
132({ \ 51({ \