[PPC] Fix cpm_dpram_addr returning phys mem instead of virt mem
[linux/fpc-iii.git] / arch / h8300 / kernel / syscalls.S
blob54e21c3f2057359df65ae62bc10b6d7e67c89288
1 /* Systemcall Entry Table */
2 #include <linux/sys.h>
3 #include <asm/linkage.h>
4 #include <asm/unistd.h>
5         
6 .globl SYMBOL_NAME(sys_call_table)
8 #if defined(CONFIG_CPU_H8300H)
9         .h8300h
10 #endif
11 #if defined(CONFIG_CPU_H8S)
12         .h8300s
13 #endif
14         .section .text
15         .align  2
16 SYMBOL_NAME_LABEL(sys_call_table)       
17         .long SYMBOL_NAME(sys_ni_syscall)       /* 0  -  old "setup()" system call*/
18         .long SYMBOL_NAME(sys_exit)
19         .long SYMBOL_NAME(sys_fork)
20         .long SYMBOL_NAME(sys_read)
21         .long SYMBOL_NAME(sys_write)
22         .long SYMBOL_NAME(sys_open)             /* 5 */
23         .long SYMBOL_NAME(sys_close)
24         .long SYMBOL_NAME(sys_waitpid)
25         .long SYMBOL_NAME(sys_creat)
26         .long SYMBOL_NAME(sys_link)
27         .long SYMBOL_NAME(sys_unlink)           /* 10 */
28         .long SYMBOL_NAME(sys_execve)
29         .long SYMBOL_NAME(sys_chdir)
30         .long SYMBOL_NAME(sys_time)
31         .long SYMBOL_NAME(sys_mknod)
32         .long SYMBOL_NAME(sys_chmod)            /* 15 */
33         .long SYMBOL_NAME(sys_chown16)
34         .long SYMBOL_NAME(sys_ni_syscall)       /* old break syscall holder */
35         .long SYMBOL_NAME(sys_stat)
36         .long SYMBOL_NAME(sys_lseek)
37         .long SYMBOL_NAME(sys_getpid)           /* 20 */
38         .long SYMBOL_NAME(sys_mount)
39         .long SYMBOL_NAME(sys_oldumount)
40         .long SYMBOL_NAME(sys_setuid16)
41         .long SYMBOL_NAME(sys_getuid16)
42         .long SYMBOL_NAME(sys_stime)            /* 25 */
43         .long SYMBOL_NAME(sys_ptrace)
44         .long SYMBOL_NAME(sys_alarm)
45         .long SYMBOL_NAME(sys_fstat)
46         .long SYMBOL_NAME(sys_pause)
47         .long SYMBOL_NAME(sys_utime)            /* 30 */
48         .long SYMBOL_NAME(sys_ni_syscall)       /* old stty syscall holder */
49         .long SYMBOL_NAME(sys_ni_syscall)       /* old gtty syscall holder */
50         .long SYMBOL_NAME(sys_access)
51         .long SYMBOL_NAME(sys_nice)
52         .long SYMBOL_NAME(sys_ni_syscall)       /* 35 old ftime syscall holder */
53         .long SYMBOL_NAME(sys_sync)
54         .long SYMBOL_NAME(sys_kill)
55         .long SYMBOL_NAME(sys_rename)
56         .long SYMBOL_NAME(sys_mkdir)
57         .long SYMBOL_NAME(sys_rmdir)            /* 40 */
58         .long SYMBOL_NAME(sys_dup)
59         .long SYMBOL_NAME(sys_pipe)
60         .long SYMBOL_NAME(sys_times)
61         .long SYMBOL_NAME(sys_ni_syscall)       /* old prof syscall holder */
62         .long SYMBOL_NAME(sys_brk)              /* 45 */
63         .long SYMBOL_NAME(sys_setgid16)
64         .long SYMBOL_NAME(sys_getgid16)
65         .long SYMBOL_NAME(sys_signal)
66         .long SYMBOL_NAME(sys_geteuid16)
67         .long SYMBOL_NAME(sys_getegid16)        /* 50 */
68         .long SYMBOL_NAME(sys_acct)
69         .long SYMBOL_NAME(sys_umount)           /* recycled never used phys() */
70         .long SYMBOL_NAME(sys_ni_syscall)       /* old lock syscall holder */
71         .long SYMBOL_NAME(sys_ioctl)
72         .long SYMBOL_NAME(sys_fcntl)            /* 55 */
73         .long SYMBOL_NAME(sys_ni_syscall)       /* old mpx syscall holder */
74         .long SYMBOL_NAME(sys_setpgid)
75         .long SYMBOL_NAME(sys_ni_syscall)       /* old ulimit syscall holder */
76         .long SYMBOL_NAME(sys_ni_syscall)
77         .long SYMBOL_NAME(sys_umask)            /* 60 */
78         .long SYMBOL_NAME(sys_chroot)
79         .long SYMBOL_NAME(sys_ustat)
80         .long SYMBOL_NAME(sys_dup2)
81         .long SYMBOL_NAME(sys_getppid)
82         .long SYMBOL_NAME(sys_getpgrp)          /* 65 */
83         .long SYMBOL_NAME(sys_setsid)
84         .long SYMBOL_NAME(sys_sigaction)
85         .long SYMBOL_NAME(sys_sgetmask)
86         .long SYMBOL_NAME(sys_ssetmask)
87         .long SYMBOL_NAME(sys_setreuid16)       /* 70 */
88         .long SYMBOL_NAME(sys_setregid16)
89         .long SYMBOL_NAME(sys_sigsuspend)
90         .long SYMBOL_NAME(sys_sigpending)
91         .long SYMBOL_NAME(sys_sethostname)
92         .long SYMBOL_NAME(sys_setrlimit)        /* 75 */
93         .long SYMBOL_NAME(sys_old_getrlimit)
94         .long SYMBOL_NAME(sys_getrusage)
95         .long SYMBOL_NAME(sys_gettimeofday)
96         .long SYMBOL_NAME(sys_settimeofday)
97         .long SYMBOL_NAME(sys_getgroups16)      /* 80 */
98         .long SYMBOL_NAME(sys_setgroups16)
99         .long SYMBOL_NAME(old_select)
100         .long SYMBOL_NAME(sys_symlink)
101         .long SYMBOL_NAME(sys_lstat)
102         .long SYMBOL_NAME(sys_readlink)         /* 85 */
103         .long SYMBOL_NAME(sys_uselib)
104         .long SYMBOL_NAME(sys_swapon)
105         .long SYMBOL_NAME(sys_reboot)
106         .long SYMBOL_NAME(old_readdir)
107         .long SYMBOL_NAME(old_mmap)             /* 90 */
108         .long SYMBOL_NAME(sys_munmap)
109         .long SYMBOL_NAME(sys_truncate)
110         .long SYMBOL_NAME(sys_ftruncate)
111         .long SYMBOL_NAME(sys_fchmod)
112         .long SYMBOL_NAME(sys_fchown16)         /* 95 */
113         .long SYMBOL_NAME(sys_getpriority)
114         .long SYMBOL_NAME(sys_setpriority)
115         .long SYMBOL_NAME(sys_ni_syscall)       /* old profil syscall holder */
116         .long SYMBOL_NAME(sys_statfs)
117         .long SYMBOL_NAME(sys_fstatfs)          /* 100 */
118         .long SYMBOL_NAME(sys_ni_syscall)       /* ioperm for i386 */
119         .long SYMBOL_NAME(sys_socketcall)
120         .long SYMBOL_NAME(sys_syslog)
121         .long SYMBOL_NAME(sys_setitimer)
122         .long SYMBOL_NAME(sys_getitimer)        /* 105 */
123         .long SYMBOL_NAME(sys_newstat)
124         .long SYMBOL_NAME(sys_newlstat)
125         .long SYMBOL_NAME(sys_newfstat)
126         .long SYMBOL_NAME(sys_ni_syscall)
127         .long SYMBOL_NAME(sys_ni_syscall)       /* iopl for i386 */ /* 110 */
128         .long SYMBOL_NAME(sys_vhangup)
129         .long SYMBOL_NAME(sys_ni_syscall)       /* obsolete idle() syscall */
130         .long SYMBOL_NAME(sys_ni_syscall)       /* vm86old for i386 */
131         .long SYMBOL_NAME(sys_wait4)
132         .long SYMBOL_NAME(sys_swapoff)          /* 115 */
133         .long SYMBOL_NAME(sys_sysinfo)
134         .long SYMBOL_NAME(sys_ipc)
135         .long SYMBOL_NAME(sys_fsync)
136         .long SYMBOL_NAME(sys_sigreturn)
137         .long SYMBOL_NAME(sys_clone)            /* 120 */
138         .long SYMBOL_NAME(sys_setdomainname)
139         .long SYMBOL_NAME(sys_newuname)
140         .long SYMBOL_NAME(sys_cacheflush)       /* modify_ldt for i386 */
141         .long SYMBOL_NAME(sys_adjtimex)
142         .long SYMBOL_NAME(sys_ni_syscall)       /* 125 sys_mprotect */
143         .long SYMBOL_NAME(sys_sigprocmask)
144         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_create_module */
145         .long SYMBOL_NAME(sys_init_module)
146         .long SYMBOL_NAME(sys_delete_module)
147         .long SYMBOL_NAME(sys_ni_syscall)       /* 130 sys_get_kernel_syms */
148         .long SYMBOL_NAME(sys_quotactl)
149         .long SYMBOL_NAME(sys_getpgid)
150         .long SYMBOL_NAME(sys_fchdir)
151         .long SYMBOL_NAME(sys_bdflush)
152         .long SYMBOL_NAME(sys_sysfs)            /* 135 */
153         .long SYMBOL_NAME(sys_personality)
154         .long SYMBOL_NAME(sys_ni_syscall)       /* for afs_syscall */
155         .long SYMBOL_NAME(sys_setfsuid16)
156         .long SYMBOL_NAME(sys_setfsgid16)
157         .long SYMBOL_NAME(sys_llseek)           /* 140 */
158         .long SYMBOL_NAME(sys_getdents)
159         .long SYMBOL_NAME(sys_select)
160         .long SYMBOL_NAME(sys_flock)
161         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_msync */
162         .long SYMBOL_NAME(sys_readv)            /* 145 */
163         .long SYMBOL_NAME(sys_writev)
164         .long SYMBOL_NAME(sys_getsid)
165         .long SYMBOL_NAME(sys_fdatasync)
166         .long SYMBOL_NAME(sys_sysctl)
167         .long SYMBOL_NAME(sys_ni_syscall)       /* 150 sys_mlock */
168         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_munlock */
169         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_mlockall */
170         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_munlockall */
171         .long SYMBOL_NAME(sys_sched_setparam)
172         .long SYMBOL_NAME(sys_sched_getparam)   /* 155 */
173         .long SYMBOL_NAME(sys_sched_setscheduler)
174         .long SYMBOL_NAME(sys_sched_getscheduler)
175         .long SYMBOL_NAME(sys_sched_yield)
176         .long SYMBOL_NAME(sys_sched_get_priority_max)
177         .long SYMBOL_NAME(sys_sched_get_priority_min)  /* 160 */
178         .long SYMBOL_NAME(sys_sched_rr_get_interval)
179         .long SYMBOL_NAME(sys_nanosleep)
180         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_mremap */
181         .long SYMBOL_NAME(sys_setresuid16)
182         .long SYMBOL_NAME(sys_getresuid16)      /* 165 */
183         .long SYMBOL_NAME(sys_ni_syscall)       /* for vm86 */
184         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_query_module */
185         .long SYMBOL_NAME(sys_poll)
186         .long SYMBOL_NAME(sys_nfsservctl)
187         .long SYMBOL_NAME(sys_setresgid16)      /* 170 */
188         .long SYMBOL_NAME(sys_getresgid16)
189         .long SYMBOL_NAME(sys_prctl)
190         .long SYMBOL_NAME(sys_rt_sigreturn)
191         .long SYMBOL_NAME(sys_rt_sigaction)
192         .long SYMBOL_NAME(sys_rt_sigprocmask)   /* 175 */
193         .long SYMBOL_NAME(sys_rt_sigpending)
194         .long SYMBOL_NAME(sys_rt_sigtimedwait)
195         .long SYMBOL_NAME(sys_rt_sigqueueinfo)
196         .long SYMBOL_NAME(sys_rt_sigsuspend)
197         .long SYMBOL_NAME(sys_pread64)          /* 180 */
198         .long SYMBOL_NAME(sys_pwrite64)
199         .long SYMBOL_NAME(sys_lchown16);
200         .long SYMBOL_NAME(sys_getcwd)
201         .long SYMBOL_NAME(sys_capget)
202         .long SYMBOL_NAME(sys_capset)           /* 185 */
203         .long SYMBOL_NAME(sys_sigaltstack)
204         .long SYMBOL_NAME(sys_sendfile)
205         .long SYMBOL_NAME(sys_ni_syscall)       /* streams1 */
206         .long SYMBOL_NAME(sys_ni_syscall)       /* streams2 */
207         .long SYMBOL_NAME(sys_vfork)            /* 190 */
208         .long SYMBOL_NAME(sys_getrlimit)
209         .long SYMBOL_NAME(sys_mmap2)
210         .long SYMBOL_NAME(sys_truncate64)
211         .long SYMBOL_NAME(sys_ftruncate64)
212         .long SYMBOL_NAME(sys_stat64)           /* 195 */
213         .long SYMBOL_NAME(sys_lstat64)
214         .long SYMBOL_NAME(sys_fstat64)
215         .long SYMBOL_NAME(sys_chown)
216         .long SYMBOL_NAME(sys_getuid)
217         .long SYMBOL_NAME(sys_getgid)           /* 200 */
218         .long SYMBOL_NAME(sys_geteuid)
219         .long SYMBOL_NAME(sys_getegid)
220         .long SYMBOL_NAME(sys_setreuid)
221         .long SYMBOL_NAME(sys_setregid)
222         .long SYMBOL_NAME(sys_getgroups)        /* 205 */
223         .long SYMBOL_NAME(sys_setgroups)
224         .long SYMBOL_NAME(sys_fchown)
225         .long SYMBOL_NAME(sys_setresuid)
226         .long SYMBOL_NAME(sys_getresuid)
227         .long SYMBOL_NAME(sys_setresgid)        /* 210 */
228         .long SYMBOL_NAME(sys_getresgid)
229         .long SYMBOL_NAME(sys_lchown)
230         .long SYMBOL_NAME(sys_setuid)
231         .long SYMBOL_NAME(sys_setgid)
232         .long SYMBOL_NAME(sys_setfsuid)         /* 215 */
233         .long SYMBOL_NAME(sys_setfsgid)
234         .long SYMBOL_NAME(sys_pivot_root)
235         .long SYMBOL_NAME(sys_ni_syscall)
236         .long SYMBOL_NAME(sys_ni_syscall)
237         .long SYMBOL_NAME(sys_getdents64)       /* 220 */
238         .long SYMBOL_NAME(sys_fcntl64)
239         .long SYMBOL_NAME(sys_ni_syscall)       /* reserved TUX */
240         .long SYMBOL_NAME(sys_ni_syscall)       /* reserved Security */
241         .long SYMBOL_NAME(sys_gettid)
242         .long SYMBOL_NAME(sys_readahead)        /* 225 */
243         .long SYMBOL_NAME(sys_setxattr)
244         .long SYMBOL_NAME(sys_lsetxattr)
245         .long SYMBOL_NAME(sys_fsetxattr)
246         .long SYMBOL_NAME(sys_getxattr)
247         .long SYMBOL_NAME(sys_lgetxattr)        /* 230 */
248         .long SYMBOL_NAME(sys_fgetxattr)
249         .long SYMBOL_NAME(sys_listxattr)
250         .long SYMBOL_NAME(sys_llistxattr)
251         .long SYMBOL_NAME(sys_flistxattr)
252         .long SYMBOL_NAME(sys_removexattr)      /* 235 */
253         .long SYMBOL_NAME(sys_lremovexattr)
254         .long SYMBOL_NAME(sys_fremovexattr)
255         .long SYMBOL_NAME(sys_tkill)
256         .long SYMBOL_NAME(sys_sendfile64)
257         .long SYMBOL_NAME(sys_futex)            /* 240 */
258         .long SYMBOL_NAME(sys_sched_setaffinity)
259         .long SYMBOL_NAME(sys_sched_getaffinity)
260         .long SYMBOL_NAME(sys_ni_syscall)
261         .long SYMBOL_NAME(sys_ni_syscall)
262         .long SYMBOL_NAME(sys_io_setup)         /* 245 */
263         .long SYMBOL_NAME(sys_io_destroy)
264         .long SYMBOL_NAME(sys_io_getevents)
265         .long SYMBOL_NAME(sys_io_submit)
266         .long SYMBOL_NAME(sys_io_cancel)
267         .long SYMBOL_NAME(sys_fadvise64)        /* 250 */
268         .long SYMBOL_NAME(sys_ni_syscall)
269         .long SYMBOL_NAME(sys_exit_group)
270         .long SYMBOL_NAME(sys_lookup_dcookie)
271         .long SYMBOL_NAME(sys_epoll_create)
272         .long SYMBOL_NAME(sys_epoll_ctl)        /* 255 */
273         .long SYMBOL_NAME(sys_epoll_wait)
274         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_remap_file_pages */
275         .long SYMBOL_NAME(sys_set_tid_address)
276         .long SYMBOL_NAME(sys_timer_create)
277         .long SYMBOL_NAME(sys_timer_settime)    /* 260 */
278         .long SYMBOL_NAME(sys_timer_gettime)
279         .long SYMBOL_NAME(sys_timer_getoverrun)
280         .long SYMBOL_NAME(sys_timer_delete)
281         .long SYMBOL_NAME(sys_clock_settime)
282         .long SYMBOL_NAME(sys_clock_gettime)    /* 265 */
283         .long SYMBOL_NAME(sys_clock_getres)
284         .long SYMBOL_NAME(sys_clock_nanosleep)
285         .long SYMBOL_NAME(sys_statfs64)
286         .long SYMBOL_NAME(sys_fstatfs64)        
287         .long SYMBOL_NAME(sys_tgkill)           /* 270 */
288         .long SYMBOL_NAME(sys_utimes)
289         .long SYMBOL_NAME(sys_fadvise64_64)
290         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_vserver */
291         .long SYMBOL_NAME(sys_ni_syscall)
292         .long SYMBOL_NAME(sys_get_mempolicy)    /* 275 */
293         .long SYMBOL_NAME(sys_set_mempolicy)
294         .long SYMBOL_NAME(sys_mq_open)
295         .long SYMBOL_NAME(sys_mq_unlink)
296         .long SYMBOL_NAME(sys_mq_timedsend)
297         .long SYMBOL_NAME(sys_mq_timedreceive)  /* 280 */
298         .long SYMBOL_NAME(sys_mq_notify)
299         .long SYMBOL_NAME(sys_mq_getsetattr)
300         .long SYMBOL_NAME(sys_waitid)
301         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_kexec_load */
302         .long SYMBOL_NAME(sys_add_key)          /* 285 */
303         .long SYMBOL_NAME(sys_request_key)
304         .long SYMBOL_NAME(sys_keyctl)
305         .long SYMBOL_NAME(sys_ioprio_set)
306         .long SYMBOL_NAME(sys_ioprio_get)       /* 290 */
307         .long SYMBOL_NAME(sys_inotify_init)
308         .long SYMBOL_NAME(sys_inotify_add_watch)
309         .long SYMBOL_NAME(sys_inotify_rm_watch)
310         .long SYMBOL_NAME(sys_migrate_pages)
311         .long SYMBOL_NAME(sys_openat)           /* 295 */
312         .long SYMBOL_NAME(sys_mkdirat)
313         .long SYMBOL_NAME(sys_mknodat)
314         .long SYMBOL_NAME(sys_fchownat)
315         .long SYMBOL_NAME(sys_futimesat)
316         .long SYMBOL_NAME(sys_fstatat64)        /* 300 */
317         .long SYMBOL_NAME(sys_unlinkat)
318         .long SYMBOL_NAME(sys_renameat)
319         .long SYMBOL_NAME(sys_linkat)
320         .long SYMBOL_NAME(sys_symlinkat)
321         .long SYMBOL_NAME(sys_readlinkat)       /* 305 */
322         .long SYMBOL_NAME(sys_fchmodat)
323         .long SYMBOL_NAME(sys_faccessat)
324         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_pselect6 */
325         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_ppoll */
326         .long SYMBOL_NAME(sys_unshare)          /* 310 */
327         .long SYMBOL_NAME(sys_set_robust_list)
328         .long SYMBOL_NAME(sys_get_robust_list)
329         .long SYMBOL_NAME(sys_splice)
330         .long SYMBOL_NAME(sys_sync_file_range)
331         .long SYMBOL_NAME(sys_tee)              /* 315 */
332         .long SYMBOL_NAME(sys_vmsplice)
333         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_move_pages */
334         .long SYMBOL_NAME(sys_getcpu)
335         .long SYMBOL_NAME(sys_ni_syscall)       /* sys_epoll_pwait */
337         .macro  call_sp addr
338         mov.l   #SYMBOL_NAME(\addr),er6
339         bra     SYMBOL_NAME(syscall_trampoline):8
340         .endm
342 SYMBOL_NAME_LABEL(sys_clone)    
343         call_sp h8300_clone
344         
345 SYMBOL_NAME_LABEL(sys_sigsuspend)
346         call_sp do_sigsuspend
348 SYMBOL_NAME_LABEL(sys_rt_sigsuspend)
349         call_sp do_rt_sigsuspend
351 SYMBOL_NAME_LABEL(sys_sigreturn)
352         call_sp do_sigreturn
354 SYMBOL_NAME_LABEL(sys_rt_sigreturn)
355         call_sp do_rt_sigreturn
357 SYMBOL_NAME_LABEL(sys_fork)
358         call_sp h8300_fork
360 SYMBOL_NAME_LABEL(sys_vfork)
361         call_sp h8300_vfork
363 SYMBOL_NAME_LABEL(syscall_trampoline)
364         mov.l   sp,er0
365         jmp     @er6