2 * File: arch/blackfin/mach-common/entry.S
4 * Author: Linus Torvalds
7 * Description: contains the system-call and fault low-level handling routines.
8 * This also contains the timer-interrupt handler, as well as all
9 * interrupts and faults that can result in a task-switch.
12 * Copyright 2004-2006 Analog Devices Inc.
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
16 * This program is free software; you can redistribute it and/or modify
17 * it under the terms of the GNU General Public License as published by
18 * the Free Software Foundation; either version 2 of the License, or
19 * (at your option) any later version.
21 * This program is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see the file COPYING, or write
28 * to the Free Software Foundation, Inc.,
29 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
33 * 25-Dec-2004 - LG Soft India
34 * 1. Fix in return_from_int, to make sure any pending
35 * system call in ILAT for this process to get
36 * executed, otherwise in case context switch happens,
37 * system call of first process (i.e in ILAT) will be
38 * carried forward to the switched process.
39 * 2. Removed Constant references for the following
46 * NOTE: This code handles signal-recognition, which happens every time
47 * after a timer-interrupt and after each system call.
51 #include <linux/linkage.h>
52 #include <linux/unistd.h>
53 #include <asm/blackfin.h>
54 #include <asm/errno.h>
55 #include <asm/thread_info.h> /* TIF_NEED_RESCHED */
56 #include <asm/asm-offsets.h>
57 #include <asm/trace.h>
59 #include <asm/mach-common/context.S>
61 #ifdef CONFIG_EXCPT_IRQ_SYSC_L1
67 /* Slightly simplified and streamlined entry point for CPLB misses.
68 * This one does not lower the level to IRQ5, and thus can be used to
69 * patch up CPLB misses on the kernel stack.
72 #if defined(ANOMALY_05000261)
74 * Work around an anomaly: if we see a new DCPLB fault, return
75 * without doing anything. Then, if we get the same fault again,
78 p5.l = _last_cplb_fault_retx;
79 p5.h = _last_cplb_fault_retx;
84 if !cc jump _return_from_exception;
94 DEBUG_START_HWTRACE(p5, r7)
101 DEBUG_START_HWTRACE(p5, r7)
102 (R7:6,P5:4) = [sp++];
104 raise 15; /* invoked by TRAP #0, for sys call */
116 ENTRY(_ex_single_step)
120 if cc jump _return_from_exception
129 if !cc jump _ex_trap_c;
132 r6.h = _exception_to_level5;
133 r6.l = _exception_to_level5;
136 if !cc jump _ex_trap_c;
138 _return_from_exception:
139 DEBUG_START_HWTRACE(p5, r7)
140 #ifdef ANOMALY_05000257
146 (R7:6,P5:4) = [sp++];
152 ENTRY(_handle_bad_cplb)
153 /* To get here, we just tried and failed to change a CPLB
154 * so, handle things in trap_c (C code), by lowering to
155 * IRQ5, just like we normally do. Since this is not a
156 * "normal" return path, we have a do alot of stuff to
157 * the stack to get ready so, we can fall through - we
158 * need to make a CPLB exception look like a normal exception
161 DEBUG_START_HWTRACE(p5, r7)
164 [--sp] = (R7:6, P5:4);
167 /* Call C code (trap_c) to handle the exception, which most
168 * likely involves sending a signal to the current process.
169 * To avoid double faults, lower our priority to IRQ5 first.
171 P5.h = _exception_to_level5;
172 P5.l = _exception_to_level5;
178 /* Disable all interrupts, but make sure level 5 is enabled so
179 * we can switch to that level. Save the old mask. */
181 p4.l = _excpt_saved_imask;
182 p4.h = _excpt_saved_imask;
187 /* Save the excause into a circular buffer, in case the instruction
188 * which caused this excecptions causes others.
190 P5.l = _in_ptr_excause;
191 P5.h = _in_ptr_excause;
197 R6.l = _excause_circ_buf;
198 R6.h = _excause_circ_buf;
204 DEBUG_START_HWTRACE(p5, r7)
205 (R7:6,P5:4) = [sp++];
212 ENTRY(_exception_to_level5)
215 /* Restore interrupt mask. We haven't pushed RETI, so this
216 * doesn't enable interrupts until we return from this handler. */
217 p4.l = _excpt_saved_imask;
218 p4.h = _excpt_saved_imask;
222 /* Restore the hardware error vector. */
233 r0 = [p2]; /* Read current IPEND */
234 [sp + PT_IPEND] = r0; /* Store IPEND */
236 /* Pop the excause from the circular buffer and push it on the stack
237 * (in the right place - if you change the location of SEQSTAT, you
238 * must change this offset.
241 P5.l = _out_ptr_excause;
242 P5.h = _out_ptr_excause;
248 R6.l = _excause_circ_buf;
249 R6.h = _excause_circ_buf;
255 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
260 /* See if anything else is in the exception buffer
261 * if there is, process it
263 P5.l = _out_ptr_excause;
264 P5.h = _out_ptr_excause;
265 P4.l = _in_ptr_excause;
266 P4.h = _in_ptr_excause;
270 if ! CC JUMP .L_excep_to_5_again
272 call _ret_from_exception;
275 ENDPROC(_exception_to_level5)
277 ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
278 /* Since the kernel stack can be anywhere, it's not guaranteed to be
279 * covered by a CPLB. Switch to an exception stack; use RETN as a
280 * scratch register (for want of a better option).
283 sp.l = _exception_stack_top;
284 sp.h = _exception_stack_top;
285 /* Try to deal with syscalls quickly. */
287 [--sp] = (R7:6, P5:4);
288 DEBUG_STOP_HWTRACE(p5, r7)
289 r7 = SEQSTAT; /* reason code is in bit 5:0 */
290 r6.l = lo(SEQSTAT_EXCAUSE);
291 r6.h = hi(SEQSTAT_EXCAUSE);
301 r7 = -ENOSYS; /* signextending enough */
302 [sp + PT_R0] = r7; /* return value from system call */
303 jump .Lsyscall_really_exit;
306 ENTRY(_kernel_execve)
309 r3 = SIZEOF_PTREGS / 4;
324 /* Success. Copy our temporary pt_regs to the top of the kernel
325 * stack and do a normal exception return.
328 r0 = (-KERNEL_STACK_SIZE) (x);
332 r0 = KERNEL_STACK_SIZE - 4 (z);
338 r3 = SIZEOF_PTREGS / 4;
344 if ! cc jump 0b (bp);
346 r0 = (KERNEL_STACK_SIZE - SIZEOF_PTREGS) (z);
351 [SP + PT_SYSCFG] = r0;
352 [p3 + (TASK_THREAD + THREAD_KSP)] = sp;
359 ENDPROC(_kernel_execve)
367 [sp + PT_IPEND] = r0;
369 /* Store RETS for now */
371 [sp + PT_RESERVED] = r0;
372 /* Set the stack for the current process */
374 r6.l = lo(ALIGN_PAGE_MASK);
375 r6.h = hi(ALIGN_PAGE_MASK);
376 r7 = r7 & r6; /* thread_info */
380 [p2+(TASK_THREAD+THREAD_KSP)] = sp;
382 /* Check the System Call */
384 /* System call number is passed in P0 */
387 if ! cc jump .Lbadsys;
389 /* are we tracing syscalls?*/
391 r6.l = lo(ALIGN_PAGE_MASK);
392 r6.h = hi(ALIGN_PAGE_MASK);
396 CC = BITTST(r7,TIF_SYSCALL_TRACE);
397 if CC JUMP _sys_trace;
399 /* Execute the appropriate system call */
402 p5.l = _sys_call_table;
403 p5.h = _sys_call_table;
420 r4.l = lo(ALIGN_PAGE_MASK);
421 r4.h = hi(ALIGN_PAGE_MASK);
422 r7 = r7 & r4; /* thread_info->flags */
424 .Lresume_userspace_1:
425 /* Disable interrupts. */
429 r7 = [p5 + TI_FLAGS];
430 r4.l = lo(_TIF_WORK_MASK);
431 r4.h = hi(_TIF_WORK_MASK);
435 cc = BITTST(r7, TIF_NEED_RESCHED);
436 if !cc jump .Lsyscall_sigpending;
438 /* Reenable interrupts. */
446 jump .Lresume_userspace_1;
448 .Lsyscall_sigpending:
449 cc = BITTST(r7, TIF_RESTORE_SIGMASK);
450 if cc jump .Lsyscall_do_signals;
451 cc = BITTST(r7, TIF_SIGPENDING);
452 if !cc jump .Lsyscall_really_exit;
453 .Lsyscall_do_signals:
454 /* Reenable interrupts. */
463 .Lsyscall_really_exit:
464 r5 = [sp + PT_RESERVED];
467 ENDPROC(_system_call)
472 /* Execute the appropriate system call */
475 p5.l = _sys_call_table;
476 p5.h = _sys_call_table;
495 jump .Lresume_userspace;
500 * Beware - when entering resume, prev (the current task) is
501 * in r0, next (the new task) is in r1.
507 [--sp] = (r7:4, p5:3);
511 [p0+(TASK_THREAD+THREAD_USP)] = p2;
513 /* save current kernel stack pointer */
514 [p0+(TASK_THREAD+THREAD_KSP)] = sp;
516 /* save program counter */
517 r1.l = _new_old_task;
518 r1.h = _new_old_task;
519 [p0+(TASK_THREAD+THREAD_PC)] = r1;
521 /* restore the kernel stack pointer */
522 sp = [p1+(TASK_THREAD+THREAD_KSP)];
524 /* restore user stack pointer */
525 p0 = [p1+(TASK_THREAD+THREAD_USP)];
529 p0 = [p1+(TASK_THREAD+THREAD_PC)];
533 * Following code actually lands up in a new (old) task.
537 (r7:4, p5:3) = [sp++];
542 * When we come out of resume, r0 carries "old" task, becuase we are
548 ENTRY(_ret_from_exception)
554 [sp + PT_IPEND] = r0;
562 if !cc jump 4f; /* if not return to user mode, get out */
564 /* Make sure any pending system call or deferred exception
565 * return in ILAT for this process to get executed, otherwise
566 * in case context switch happens, system call of
567 * first process (i.e in ILAT) will be carried
568 * forward to the switched process
574 r1 = (EVT_IVG14 | EVT_IVG15) (z);
579 /* Set the stack for the current process */
581 r4.l = lo(ALIGN_PAGE_MASK);
582 r4.h = hi(ALIGN_PAGE_MASK);
583 r7 = r7 & r4; /* thread_info->flags */
585 r7 = [p5 + TI_FLAGS];
586 r4.l = lo(_TIF_WORK_MASK);
587 r4.h = hi(_TIF_WORK_MASK);
594 p1.l = _schedule_and_signal;
595 p1.h = _schedule_and_signal;
598 raise 15; /* raise evt14 to do signal or reschedule */
605 ENDPROC(_ret_from_exception)
607 ENTRY(_return_from_int)
608 /* If someone else already raised IRQ 15, do nothing. */
613 cc = bittst (r0, EVT_IVG15_P);
616 /* if not return to user mode, get out */
630 /* Lower the interrupt level to 15. */
633 p1.l = _schedule_and_signal_from_int;
634 p1.h = _schedule_and_signal_from_int;
637 #if defined(ANOMALY_05000281)
638 r0.l = lo(CONFIG_BOOT_LOAD);
639 r0.h = hi(CONFIG_BOOT_LOAD);
644 raise 15; /* raise evt15 to do signal or reschedule */
648 ENDPROC(_return_from_int)
650 ENTRY(_lower_to_irq14)
651 #if defined(ANOMALY_05000281)
652 r0.l = lo(CONFIG_BOOT_LOAD);
653 r0.h = hi(CONFIG_BOOT_LOAD);
660 ENTRY(_evt14_softirq)
661 #ifdef CONFIG_DEBUG_HWERR
671 _schedule_and_signal_from_int:
672 /* To end up here, vector 15 was changed - so we have to change it
677 p1.l = _evt_system_call;
678 p1.h = _evt_system_call;
682 /* Set orig_p0 to -1 to indicate this isn't the end of a syscall. */
684 [sp + PT_ORIG_P0] = r0;
687 [sp + PT_RESERVED] = p1;
696 call _finish_atomic_sections;
698 jump.s .Lresume_userspace;
700 _schedule_and_signal:
702 /* To end up here, vector 15 was changed - so we have to change it
707 p1.l = _evt_system_call;
708 p1.h = _evt_system_call;
713 [sp + PT_RESERVED] = P0;
714 call .Lresume_userspace;
718 ENDPROC(_lower_to_irq14)
720 /* Make sure when we start, that the circular buffer is initialized properly
721 * R0 and P0 are call clobbered, so we can use them here.
723 ENTRY(_init_exception_buff)
725 p0.h = _in_ptr_excause;
726 p0.l = _in_ptr_excause;
728 p0.h = _out_ptr_excause;
729 p0.l = _out_ptr_excause;
732 ENDPROC(_init_exception_buff)
735 * Put these in the kernel data section - that should always be covered by
736 * a CPLB. This is needed to ensure we don't get double fault conditions
739 #ifdef CONFIG_SYSCALL_TAB_L1
746 /* entry for each EXCAUSE[5:0]
747 * This table must be in sync with the table in ./kernel/traps.c
748 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
750 .long _ex_syscall; /* 0x00 - User Defined - Linux Syscall */
751 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
752 .long _ex_trap_c /* 0x02 - User Defined */
753 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
754 .long _ex_trap_c /* 0x04 - User Defined */
755 .long _ex_trap_c /* 0x05 - User Defined */
756 .long _ex_trap_c /* 0x06 - User Defined */
757 .long _ex_trap_c /* 0x07 - User Defined */
758 .long _ex_trap_c /* 0x08 - User Defined */
759 .long _ex_trap_c /* 0x09 - User Defined */
760 .long _ex_trap_c /* 0x0A - User Defined */
761 .long _ex_trap_c /* 0x0B - User Defined */
762 .long _ex_trap_c /* 0x0C - User Defined */
763 .long _ex_trap_c /* 0x0D - User Defined */
764 .long _ex_trap_c /* 0x0E - User Defined */
765 .long _ex_trap_c /* 0x0F - User Defined */
766 .long _ex_single_step /* 0x10 - HW Single step */
767 .long _ex_trap_c /* 0x11 - Trace Buffer Full */
768 .long _ex_trap_c /* 0x12 - Reserved */
769 .long _ex_trap_c /* 0x13 - Reserved */
770 .long _ex_trap_c /* 0x14 - Reserved */
771 .long _ex_trap_c /* 0x15 - Reserved */
772 .long _ex_trap_c /* 0x16 - Reserved */
773 .long _ex_trap_c /* 0x17 - Reserved */
774 .long _ex_trap_c /* 0x18 - Reserved */
775 .long _ex_trap_c /* 0x19 - Reserved */
776 .long _ex_trap_c /* 0x1A - Reserved */
777 .long _ex_trap_c /* 0x1B - Reserved */
778 .long _ex_trap_c /* 0x1C - Reserved */
779 .long _ex_trap_c /* 0x1D - Reserved */
780 .long _ex_trap_c /* 0x1E - Reserved */
781 .long _ex_trap_c /* 0x1F - Reserved */
782 .long _ex_trap_c /* 0x20 - Reserved */
783 .long _ex_trap_c /* 0x21 - Undefined Instruction */
784 .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */
785 .long _ex_dcplb /* 0x23 - Data CPLB Protection Violation */
786 .long _ex_trap_c /* 0x24 - Data access misaligned */
787 .long _ex_trap_c /* 0x25 - Unrecoverable Event */
788 .long _ex_dcplb /* 0x26 - Data CPLB Miss */
789 .long _ex_trap_c /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */
790 .long _ex_trap_c /* 0x28 - Emulation Watchpoint */
791 .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */
792 .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */
793 .long _ex_icplb /* 0x2B - Instruction CPLB protection Violation */
794 .long _ex_icplb /* 0x2C - Instruction CPLB miss */
795 .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */
796 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
797 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
798 .long _ex_trap_c /* 0x2F - Reserved */
799 .long _ex_trap_c /* 0x30 - Reserved */
800 .long _ex_trap_c /* 0x31 - Reserved */
801 .long _ex_trap_c /* 0x32 - Reserved */
802 .long _ex_trap_c /* 0x33 - Reserved */
803 .long _ex_trap_c /* 0x34 - Reserved */
804 .long _ex_trap_c /* 0x35 - Reserved */
805 .long _ex_trap_c /* 0x36 - Reserved */
806 .long _ex_trap_c /* 0x37 - Reserved */
807 .long _ex_trap_c /* 0x38 - Reserved */
808 .long _ex_trap_c /* 0x39 - Reserved */
809 .long _ex_trap_c /* 0x3A - Reserved */
810 .long _ex_trap_c /* 0x3B - Reserved */
811 .long _ex_trap_c /* 0x3C - Reserved */
812 .long _ex_trap_c /* 0x3D - Reserved */
813 .long _ex_trap_c /* 0x3E - Reserved */
814 .long _ex_trap_c /* 0x3F - Reserved */
817 ENTRY(_sys_call_table)
818 .long _sys_restart_syscall /* 0 */
823 .long _sys_open /* 5 */
825 .long _sys_ni_syscall /* old waitpid */
828 .long _sys_unlink /* 10 */
833 .long _sys_chmod /* 15 */
834 .long _sys_chown /* chown16 */
835 .long _sys_ni_syscall /* old break syscall holder */
836 .long _sys_ni_syscall /* old stat */
838 .long _sys_getpid /* 20 */
840 .long _sys_ni_syscall /* old umount */
843 .long _sys_stime /* 25 */
846 .long _sys_ni_syscall /* old fstat */
848 .long _sys_ni_syscall /* old utime */ /* 30 */
849 .long _sys_ni_syscall /* old stty syscall holder */
850 .long _sys_ni_syscall /* old gtty syscall holder */
853 .long _sys_ni_syscall /* 35 */ /* old ftime syscall holder */
858 .long _sys_rmdir /* 40 */
862 .long _sys_ni_syscall /* old prof syscall holder */
863 .long _sys_brk /* 45 */
866 .long _sys_ni_syscall /* old sys_signal */
867 .long _sys_geteuid /* geteuid16 */
868 .long _sys_getegid /* getegid16 */ /* 50 */
870 .long _sys_umount /* recycled never used phys() */
871 .long _sys_ni_syscall /* old lock syscall holder */
873 .long _sys_fcntl /* 55 */
874 .long _sys_ni_syscall /* old mpx syscall holder */
876 .long _sys_ni_syscall /* old ulimit syscall holder */
877 .long _sys_ni_syscall /* old old uname */
878 .long _sys_umask /* 60 */
883 .long _sys_getpgrp /* 65 */
885 .long _sys_ni_syscall /* old sys_sigaction */
888 .long _sys_setreuid /* setreuid16 */ /* 70 */
889 .long _sys_setregid /* setregid16 */
890 .long _sys_ni_syscall /* old sys_sigsuspend */
891 .long _sys_ni_syscall /* old sys_sigpending */
892 .long _sys_sethostname
893 .long _sys_setrlimit /* 75 */
894 .long _sys_ni_syscall /* old getrlimit */
896 .long _sys_gettimeofday
897 .long _sys_settimeofday
898 .long _sys_getgroups /* getgroups16 */ /* 80 */
899 .long _sys_setgroups /* setgroups16 */
900 .long _sys_ni_syscall /* old_select */
902 .long _sys_ni_syscall /* old lstat */
903 .long _sys_readlink /* 85 */
905 .long _sys_ni_syscall /* sys_swapon */
907 .long _sys_ni_syscall /* old_readdir */
908 .long _sys_ni_syscall /* sys_mmap */ /* 90 */
913 .long _sys_fchown /* fchown16 */ /* 95 */
914 .long _sys_getpriority
915 .long _sys_setpriority
916 .long _sys_ni_syscall /* old profil syscall holder */
918 .long _sys_fstatfs /* 100 */
919 .long _sys_ni_syscall
920 .long _sys_ni_syscall /* old sys_socketcall */
923 .long _sys_getitimer /* 105 */
927 .long _sys_ni_syscall /* old uname */
928 .long _sys_ni_syscall /* iopl for i386 */ /* 110 */
930 .long _sys_ni_syscall /* obsolete idle() syscall */
931 .long _sys_ni_syscall /* vm86old for i386 */
933 .long _sys_ni_syscall /* 115 */ /* sys_swapoff */
935 .long _sys_ni_syscall /* old sys_ipc */
937 .long _sys_ni_syscall /* old sys_sigreturn */
938 .long _sys_clone /* 120 */
939 .long _sys_setdomainname
941 .long _sys_ni_syscall /* old sys_modify_ldt */
943 .long _sys_ni_syscall /* 125 */ /* sys_mprotect */
944 .long _sys_ni_syscall /* old sys_sigprocmask */
945 .long _sys_ni_syscall /* old "creat_module" */
946 .long _sys_init_module
947 .long _sys_delete_module
948 .long _sys_ni_syscall /* 130: old "get_kernel_syms" */
953 .long _sys_ni_syscall /* 135 */ /* sys_sysfs */
954 .long _sys_personality
955 .long _sys_ni_syscall /* for afs_syscall */
956 .long _sys_setfsuid /* setfsuid16 */
957 .long _sys_setfsgid /* setfsgid16 */
958 .long _sys_llseek /* 140 */
960 .long _sys_ni_syscall /* sys_select */
962 .long _sys_ni_syscall /* sys_msync */
963 .long _sys_readv /* 145 */
968 .long _sys_ni_syscall /* 150 */ /* sys_mlock */
969 .long _sys_ni_syscall /* sys_munlock */
970 .long _sys_ni_syscall /* sys_mlockall */
971 .long _sys_ni_syscall /* sys_munlockall */
972 .long _sys_sched_setparam
973 .long _sys_sched_getparam /* 155 */
974 .long _sys_sched_setscheduler
975 .long _sys_sched_getscheduler
976 .long _sys_sched_yield
977 .long _sys_sched_get_priority_max
978 .long _sys_sched_get_priority_min /* 160 */
979 .long _sys_sched_rr_get_interval
982 .long _sys_setresuid /* setresuid16 */
983 .long _sys_getresuid /* getresuid16 */ /* 165 */
984 .long _sys_ni_syscall /* for vm86 */
985 .long _sys_ni_syscall /* old "query_module" */
986 .long _sys_ni_syscall /* sys_poll */
987 .long _sys_nfsservctl
988 .long _sys_setresgid /* setresgid16 */ /* 170 */
989 .long _sys_getresgid /* getresgid16 */
991 .long _sys_rt_sigreturn
992 .long _sys_rt_sigaction
993 .long _sys_rt_sigprocmask /* 175 */
994 .long _sys_rt_sigpending
995 .long _sys_rt_sigtimedwait
996 .long _sys_rt_sigqueueinfo
997 .long _sys_rt_sigsuspend
998 .long _sys_pread64 /* 180 */
1000 .long _sys_lchown /* lchown16 */
1003 .long _sys_capset /* 185 */
1004 .long _sys_sigaltstack
1006 .long _sys_ni_syscall /* streams1 */
1007 .long _sys_ni_syscall /* streams2 */
1008 .long _sys_vfork /* 190 */
1009 .long _sys_getrlimit
1011 .long _sys_truncate64
1012 .long _sys_ftruncate64
1013 .long _sys_stat64 /* 195 */
1018 .long _sys_getgid /* 200 */
1023 .long _sys_getgroups /* 205 */
1024 .long _sys_setgroups
1026 .long _sys_setresuid
1027 .long _sys_getresuid
1028 .long _sys_setresgid /* 210 */
1029 .long _sys_getresgid
1033 .long _sys_setfsuid /* 215 */
1035 .long _sys_pivot_root
1036 .long _sys_ni_syscall /* sys_mincore */
1037 .long _sys_ni_syscall /* sys_madvise */
1038 .long _sys_getdents64 /* 220 */
1040 .long _sys_ni_syscall /* reserved for TUX */
1041 .long _sys_ni_syscall
1043 .long _sys_readahead /* 225 */
1045 .long _sys_lsetxattr
1046 .long _sys_fsetxattr
1048 .long _sys_lgetxattr /* 230 */
1049 .long _sys_fgetxattr
1050 .long _sys_listxattr
1051 .long _sys_llistxattr
1052 .long _sys_flistxattr
1053 .long _sys_removexattr /* 235 */
1054 .long _sys_lremovexattr
1055 .long _sys_fremovexattr
1057 .long _sys_sendfile64
1058 .long _sys_futex /* 240 */
1059 .long _sys_sched_setaffinity
1060 .long _sys_sched_getaffinity
1061 .long _sys_ni_syscall /* sys_set_thread_area */
1062 .long _sys_ni_syscall /* sys_get_thread_area */
1063 .long _sys_io_setup /* 245 */
1064 .long _sys_io_destroy
1065 .long _sys_io_getevents
1066 .long _sys_io_submit
1067 .long _sys_io_cancel
1068 .long _sys_ni_syscall /* 250 */ /* sys_alloc_hugepages */
1069 .long _sys_ni_syscall /* sys_freec_hugepages */
1070 .long _sys_exit_group
1071 .long _sys_lookup_dcookie
1072 .long _sys_bfin_spinlock
1073 .long _sys_epoll_create /* 255 */
1074 .long _sys_epoll_ctl
1075 .long _sys_epoll_wait
1076 .long _sys_ni_syscall /* remap_file_pages */
1077 .long _sys_set_tid_address
1078 .long _sys_timer_create /* 260 */
1079 .long _sys_timer_settime
1080 .long _sys_timer_gettime
1081 .long _sys_timer_getoverrun
1082 .long _sys_timer_delete
1083 .long _sys_clock_settime /* 265 */
1084 .long _sys_clock_gettime
1085 .long _sys_clock_getres
1086 .long _sys_clock_nanosleep
1088 .long _sys_fstatfs64 /* 270 */
1091 .long _sys_fadvise64_64
1092 .long _sys_ni_syscall /* vserver */
1093 .long _sys_ni_syscall /* 275, mbind */
1094 .long _sys_ni_syscall /* get_mempolicy */
1095 .long _sys_ni_syscall /* set_mempolicy */
1097 .long _sys_mq_unlink
1098 .long _sys_mq_timedsend /* 280 */
1099 .long _sys_mq_timedreceive
1100 .long _sys_mq_notify
1101 .long _sys_mq_getsetattr
1102 .long _sys_ni_syscall /* kexec_load */
1103 .long _sys_waitid /* 285 */
1105 .long _sys_request_key
1107 .long _sys_ioprio_set
1108 .long _sys_ioprio_get /* 290 */
1109 .long _sys_inotify_init
1110 .long _sys_inotify_add_watch
1111 .long _sys_inotify_rm_watch
1112 .long _sys_ni_syscall /* migrate_pages */
1113 .long _sys_openat /* 295 */
1117 .long _sys_futimesat
1118 .long _sys_fstatat64 /* 300 */
1122 .long _sys_symlinkat
1123 .long _sys_readlinkat /* 305 */
1125 .long _sys_faccessat
1128 .long _sys_unshare /* 310 */
1129 .long _sys_sram_alloc
1130 .long _sys_sram_free
1131 .long _sys_dma_memcpy
1133 .long _sys_bind /* 315 */
1135 .long _sys_getpeername
1136 .long _sys_getsockname
1137 .long _sys_getsockopt
1138 .long _sys_listen /* 320 */
1143 .long _sys_sendmsg /* 325 */
1145 .long _sys_setsockopt
1148 .long _sys_socketpair /* 330 */
1153 .long _sys_msgget /* 335 */
1158 .long _sys_shmdt /* 340 */
1161 .long _sys_sync_file_range
1163 .long _sys_vmsplice /* 345 */
1164 .long _sys_epoll_pwait
1165 .long _sys_utimensat
1168 .long _sys_eventfd /* 350 */
1171 .long _sys_fadvise64
1172 .long _sys_set_robust_list
1173 .long _sys_get_robust_list /* 355 */
1174 .long _sys_fallocate
1175 .rept NR_syscalls-(.-_sys_call_table)/4
1176 .long _sys_ni_syscall
1185 _exception_stack_top:
1187 #if defined(ANOMALY_05000261)
1188 /* Used by the assembly entry point to work around an anomaly. */
1189 _last_cplb_fault_retx:
1193 * Single instructions can have multiple faults, which need to be
1194 * handled by traps.c, in irq5. We store the exception cause to ensure
1195 * we don't miss a double fault condition
1197 ENTRY(_in_ptr_excause)
1199 ENTRY(_out_ptr_excause)
1202 ENTRY(_excause_circ_buf)