aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/kernel/sys_h8300.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300/kernel/sys_h8300.c')
-rw-r--r--arch/h8300/kernel/sys_h8300.c138
1 files changed, 0 insertions, 138 deletions
diff --git a/arch/h8300/kernel/sys_h8300.c b/arch/h8300/kernel/sys_h8300.c
index b5969db0ca1..f9b3f44da69 100644
--- a/arch/h8300/kernel/sys_h8300.c
+++ b/arch/h8300/kernel/sys_h8300.c
@@ -26,144 +26,6 @@
26#include <asm/traps.h> 26#include <asm/traps.h>
27#include <asm/unistd.h> 27#include <asm/unistd.h>
28 28
29/*
30 * Perform the select(nd, in, out, ex, tv) and mmap() system
31 * calls. Linux/m68k cloned Linux/i386, which didn't use to be able to
32 * handle more than 4 system call parameters, so these system calls
33 * used a memory block for parameter passing..
34 */
35
36struct mmap_arg_struct {
37 unsigned long addr;
38 unsigned long len;
39 unsigned long prot;
40 unsigned long flags;
41 unsigned long fd;
42 unsigned long offset;
43};
44
45asmlinkage int old_mmap(struct mmap_arg_struct *arg)
46{
47 struct mmap_arg_struct a;
48 int error = -EFAULT;
49
50 if (copy_from_user(&a, arg, sizeof(a)))
51 goto out;
52
53 error = -EINVAL;
54 if (a.offset & ~PAGE_MASK)
55 goto out;
56
57 error = sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd,
58 a.offset >> PAGE_SHIFT);
59out:
60 return error;
61}
62
63struct sel_arg_struct {
64 unsigned long n;
65 fd_set *inp, *outp, *exp;
66 struct timeval *tvp;
67};
68
69asmlinkage int old_select(struct sel_arg_struct *arg)
70{
71 struct sel_arg_struct a;
72
73 if (copy_from_user(&a, arg, sizeof(a)))
74 return -EFAULT;
75 /* sys_select() does the appropriate kernel locking */
76 return sys_select(a.n, a.inp, a.outp, a.exp, a.tvp);
77}
78
79/*
80 * sys_ipc() is the de-multiplexer for the SysV IPC calls..
81 *
82 * This is really horribly ugly.
83 */
84asmlinkage int sys_ipc (uint call, int first, int second,
85 int third, void *ptr, long fifth)
86{
87 int version, ret;
88
89 version = call >> 16; /* hack for backward compatibility */
90 call &= 0xffff;
91
92 if (call <= SEMCTL)
93 switch (call) {
94 case SEMOP:
95 return sys_semop (first, (struct sembuf *)ptr, second);
96 case SEMGET:
97 return sys_semget (first, second, third);
98 case SEMCTL: {
99 union semun fourth;
100 if (!ptr)
101 return -EINVAL;
102 if (get_user(fourth.__pad, (void **) ptr))
103 return -EFAULT;
104 return sys_semctl (first, second, third, fourth);
105 }
106 default:
107 return -EINVAL;
108 }
109 if (call <= MSGCTL)
110 switch (call) {
111 case MSGSND:
112 return sys_msgsnd (first, (struct msgbuf *) ptr,
113 second, third);
114 case MSGRCV:
115 switch (version) {
116 case 0: {
117 struct ipc_kludge tmp;
118 if (!ptr)
119 return -EINVAL;
120 if (copy_from_user (&tmp,
121 (struct ipc_kludge *)ptr,
122 sizeof (tmp)))
123 return -EFAULT;
124 return sys_msgrcv (first, tmp.msgp, second,
125 tmp.msgtyp, third);
126 }
127 default:
128 return sys_msgrcv (first,
129 (struct msgbuf *) ptr,
130 second, fifth, third);
131 }
132 case MSGGET:
133 return sys_msgget ((key_t) first, second);
134 case MSGCTL:
135 return sys_msgctl (first, second,
136 (struct msqid_ds *) ptr);
137 default:
138 return -EINVAL;
139 }
140 if (call <= SHMCTL)
141 switch (call) {
142 case SHMAT:
143 switch (version) {
144 default: {
145 ulong raddr;
146 ret = do_shmat (first, (char *) ptr,
147 second, &raddr);
148 if (ret)
149 return ret;
150 return put_user (raddr, (ulong *) third);
151 }
152 }
153 case SHMDT:
154 return sys_shmdt ((char *)ptr);
155 case SHMGET:
156 return sys_shmget (first, second, third);
157 case SHMCTL:
158 return sys_shmctl (first, second,
159 (struct shmid_ds *) ptr);
160 default:
161 return -EINVAL;
162 }
163
164 return -EINVAL;
165}
166
167/* sys_cacheflush -- no support. */ 29/* sys_cacheflush -- no support. */
168asmlinkage int 30asmlinkage int
169sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) 31sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len)