aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/sys_sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/sys_sh.c')
-rw-r--r--arch/sh/kernel/sys_sh.c104
1 files changed, 0 insertions, 104 deletions
diff --git a/arch/sh/kernel/sys_sh.c b/arch/sh/kernel/sys_sh.c
index 71399cde03b5..c18cfaa67fdd 100644
--- a/arch/sh/kernel/sys_sh.c
+++ b/arch/sh/kernel/sys_sh.c
@@ -53,110 +53,6 @@ asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
53 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff); 53 return sys_mmap_pgoff(addr, len, prot, flags, fd, pgoff);
54} 54}
55 55
56/*
57 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
58 *
59 * This is really horribly ugly.
60 */
61asmlinkage int sys_ipc(uint call, int first, int second,
62 int third, void __user *ptr, long fifth)
63{
64 int version, ret;
65
66 version = call >> 16; /* hack for backward compatibility */
67 call &= 0xffff;
68
69 if (call <= SEMTIMEDOP)
70 switch (call) {
71 case SEMOP:
72 return sys_semtimedop(first,
73 (struct sembuf __user *)ptr,
74 second, NULL);
75 case SEMTIMEDOP:
76 return sys_semtimedop(first,
77 (struct sembuf __user *)ptr, second,
78 (const struct timespec __user *)fifth);
79 case SEMGET:
80 return sys_semget (first, second, third);
81 case SEMCTL: {
82 union semun fourth;
83 if (!ptr)
84 return -EINVAL;
85 if (get_user(fourth.__pad, (void __user * __user *) ptr))
86 return -EFAULT;
87 return sys_semctl (first, second, third, fourth);
88 }
89 default:
90 return -EINVAL;
91 }
92
93 if (call <= MSGCTL)
94 switch (call) {
95 case MSGSND:
96 return sys_msgsnd (first, (struct msgbuf __user *) ptr,
97 second, third);
98 case MSGRCV:
99 switch (version) {
100 case 0:
101 {
102 struct ipc_kludge tmp;
103
104 if (!ptr)
105 return -EINVAL;
106
107 if (copy_from_user(&tmp,
108 (struct ipc_kludge __user *) ptr,
109 sizeof (tmp)))
110 return -EFAULT;
111
112 return sys_msgrcv (first, tmp.msgp, second,
113 tmp.msgtyp, third);
114 }
115 default:
116 return sys_msgrcv (first,
117 (struct msgbuf __user *) ptr,
118 second, fifth, third);
119 }
120 case MSGGET:
121 return sys_msgget ((key_t) first, second);
122 case MSGCTL:
123 return sys_msgctl (first, second,
124 (struct msqid_ds __user *) ptr);
125 default:
126 return -EINVAL;
127 }
128 if (call <= SHMCTL)
129 switch (call) {
130 case SHMAT:
131 switch (version) {
132 default: {
133 ulong raddr;
134 ret = do_shmat (first, (char __user *) ptr,
135 second, &raddr);
136 if (ret)
137 return ret;
138 return put_user (raddr, (ulong __user *) third);
139 }
140 case 1: /* iBCS2 emulator entry point */
141 if (!segment_eq(get_fs(), get_ds()))
142 return -EINVAL;
143 return do_shmat (first, (char __user *) ptr,
144 second, (ulong *) third);
145 }
146 case SHMDT:
147 return sys_shmdt ((char __user *)ptr);
148 case SHMGET:
149 return sys_shmget (first, second, third);
150 case SHMCTL:
151 return sys_shmctl (first, second,
152 (struct shmid_ds __user *) ptr);
153 default:
154 return -EINVAL;
155 }
156
157 return -EINVAL;
158}
159
160/* sys_cacheflush -- flush (part of) the processor cache. */ 56/* sys_cacheflush -- flush (part of) the processor cache. */
161asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op) 57asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op)
162{ 58{