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
32 /* NOTE: This code handles signal-recognition, which happens every time
33 * after a timer-interrupt and after each system call.
36 #include <linux/init.h>
37 #include <linux/linkage.h>
38 #include <linux/unistd.h>
39 #include <asm/blackfin.h>
40 #include <asm/errno.h>
41 #include <asm/thread_info.h> /* TIF_NEED_RESCHED */
42 #include <asm/asm-offsets.h>
43 #include <asm/trace.h>
45 #include <asm/mach-common/context.S>
47 #if defined(CONFIG_BFIN_SCRATCH_REG_RETN)
48 # define EX_SCRATCH_REG RETN
49 #elif defined(CONFIG_BFIN_SCRATCH_REG_RETE)
50 # define EX_SCRATCH_REG RETE
52 # define EX_SCRATCH_REG CYCLES
56 ENTRY(_safe_speculative_execution)
60 jump _safe_speculative_execution;
61 ENDPROC(_safe_speculative_execution)
64 #ifdef CONFIG_EXCPT_IRQ_SYSC_L1
70 /* Slightly simplified and streamlined entry point for CPLB misses.
71 * This one does not lower the level to IRQ5, and thus can be used to
72 * patch up CPLB misses on the kernel stack.
75 #define _ex_dviol _ex_workaround_261
76 #define _ex_dmiss _ex_workaround_261
77 #define _ex_dmult _ex_workaround_261
79 ENTRY(_ex_workaround_261)
81 * Work around an anomaly: if we see a new DCPLB fault, return
82 * without doing anything. Then, if we get the same fault again,
85 P4 = R7; /* Store EXCAUSE */
86 p5.l = _last_cplb_fault_retx;
87 p5.h = _last_cplb_fault_retx;
92 if !cc jump _bfin_return_from_exception;
95 R6 = 0x26; /* Data CPLB Miss */
97 if cc jump _ex_dcplb_miss (BP);
98 R6 = 0x23; /* Data CPLB Miss */
100 if cc jump _ex_dcplb_viol (BP);
101 /* Handle 0x23 Data CPLB Protection Violation
102 * and Data CPLB Multiple Hits - Linux Trap Zero
105 ENDPROC(_ex_workaround_261)
109 #define _ex_dviol _ex_dcplb_viol
111 #define _ex_dviol _ex_trap_c
113 #define _ex_dmiss _ex_dcplb_miss
114 #define _ex_dmult _ex_trap_c
118 ENTRY(_ex_dcplb_viol)
119 ENTRY(_ex_dcplb_miss)
120 ENTRY(_ex_icplb_miss)
121 (R7:6,P5:4) = [sp++];
124 DEBUG_HWTRACE_SAVE(p5, r7)
132 IF !CC JUMP _handle_bad_cplb;
136 DEBUG_HWTRACE_RESTORE(p5, r7)
140 ENDPROC(_ex_icplb_miss)
143 (R7:6,P5:4) = [sp++];
145 raise 15; /* invoked by TRAP #0, for sys call */
157 ENTRY(_ex_single_step)
161 if cc jump _bfin_return_from_exception
170 if !cc jump _ex_trap_c;
173 r6.h = _exception_to_level5;
174 r6.l = _exception_to_level5;
177 if !cc jump _ex_trap_c;
178 ENDPROC(_ex_single_step)
180 ENTRY(_bfin_return_from_exception)
187 (R7:6,P5:4) = [sp++];
191 ENDPROC(_bfin_return_from_exception)
193 ENTRY(_handle_bad_cplb)
194 /* To get here, we just tried and failed to change a CPLB
195 * so, handle things in trap_c (C code), by lowering to
196 * IRQ5, just like we normally do. Since this is not a
197 * "normal" return path, we have a do alot of stuff to
198 * the stack to get ready so, we can fall through - we
199 * need to make a CPLB exception look like a normal exception
204 [--sp] = (R7:6,P5:4);
206 ENTRY(_ex_replaceable)
210 /* Make sure we are not in a double fault */
215 if CC jump _double_fault;
217 /* Call C code (trap_c) to handle the exception, which most
218 * likely involves sending a signal to the current process.
219 * To avoid double faults, lower our priority to IRQ5 first.
221 P5.h = _exception_to_level5;
222 P5.l = _exception_to_level5;
228 /* Disable all interrupts, but make sure level 5 is enabled so
229 * we can switch to that level. Save the old mask. */
231 p4.l = _excpt_saved_imask;
232 p4.h = _excpt_saved_imask;
237 /* Save the excause into a circular buffer, in case the instruction
238 * which caused this excecptions causes others.
240 P5.l = _in_ptr_excause;
241 P5.h = _in_ptr_excause;
247 R6.l = _excause_circ_buf;
248 R6.h = _excause_circ_buf;
254 (R7:6,P5:4) = [sp++];
261 /* We just realized we got an exception, while we were processing a different
262 * exception. This is a unrecoverable event, so crash
265 /* Turn caches & protection off, to ensure we don't get any more
269 P4.L = LO(IMEM_CONTROL);
270 P4.H = HI(IMEM_CONTROL);
272 R5 = [P4]; /* Control Register*/
273 BITCLR(R5,ENICPLB_P);
274 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
279 P4.L = LO(DMEM_CONTROL);
280 P4.H = HI(DMEM_CONTROL);
282 BITCLR(R5,ENDCPLB_P);
283 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
288 /* Fix up the stack */
289 (R7:6,P5:4) = [sp++];
293 /* We should be out of the exception stack, and back down into
294 * kernel or user space stack
298 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
300 call _double_fault_c;
302 .L_double_fault_panic:
303 JUMP .L_double_fault_panic
305 ENDPROC(_double_fault)
307 ENTRY(_exception_to_level5)
310 /* Restore interrupt mask. We haven't pushed RETI, so this
311 * doesn't enable interrupts until we return from this handler. */
312 p4.l = _excpt_saved_imask;
313 p4.h = _excpt_saved_imask;
317 /* Restore the hardware error vector. */
328 r0 = [p2]; /* Read current IPEND */
329 [sp + PT_IPEND] = r0; /* Store IPEND */
331 /* Pop the excause from the circular buffer and push it on the stack
332 * (in the right place - if you change the location of SEQSTAT, you
333 * must change this offset.
336 P5.l = _out_ptr_excause;
337 P5.h = _out_ptr_excause;
343 R6.l = _excause_circ_buf;
344 R6.h = _excause_circ_buf;
348 [SP + PT_SEQSTAT] = r1;
350 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
355 /* See if anything else is in the exception buffer
356 * if there is, process it
358 P5.l = _out_ptr_excause;
359 P5.h = _out_ptr_excause;
360 P4.l = _in_ptr_excause;
361 P4.h = _in_ptr_excause;
365 if ! CC JUMP .L_excep_to_5_again
367 call _ret_from_exception;
370 ENDPROC(_exception_to_level5)
372 ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
373 /* Since the kernel stack can be anywhere, it's not guaranteed to be
374 * covered by a CPLB. Switch to an exception stack; use RETN as a
375 * scratch register (for want of a better option).
378 sp.l = _exception_stack_top;
379 sp.h = _exception_stack_top;
380 /* Try to deal with syscalls quickly. */
382 [--sp] = (R7:6,P5:4);
383 r7 = SEQSTAT; /* reason code is in bit 5:0 */
384 r6.l = lo(SEQSTAT_EXCAUSE);
385 r6.h = hi(SEQSTAT_EXCAUSE);
395 r7 = -ENOSYS; /* signextending enough */
396 [sp + PT_R0] = r7; /* return value from system call */
397 jump .Lsyscall_really_exit;
400 ENTRY(_kernel_execve)
403 r3 = SIZEOF_PTREGS / 4;
418 /* Success. Copy our temporary pt_regs to the top of the kernel
419 * stack and do a normal exception return.
422 r0 = (-KERNEL_STACK_SIZE) (x);
426 r0 = KERNEL_STACK_SIZE - 4 (z);
432 r3 = SIZEOF_PTREGS / 4;
438 if ! cc jump 0b (bp);
440 r0 = (KERNEL_STACK_SIZE - SIZEOF_PTREGS) (z);
445 [SP + PT_SYSCFG] = r0;
446 [p3 + (TASK_THREAD + THREAD_KSP)] = sp;
453 ENDPROC(_kernel_execve)
461 [sp + PT_IPEND] = r0;
463 /* Store RETS for now */
465 [sp + PT_RESERVED] = r0;
466 /* Set the stack for the current process */
468 r6.l = lo(ALIGN_PAGE_MASK);
469 r6.h = hi(ALIGN_PAGE_MASK);
470 r7 = r7 & r6; /* thread_info */
474 [p2+(TASK_THREAD+THREAD_KSP)] = sp;
476 /* Check the System Call */
478 /* System call number is passed in P0 */
481 if ! cc jump .Lbadsys;
483 /* are we tracing syscalls?*/
485 r6.l = lo(ALIGN_PAGE_MASK);
486 r6.h = hi(ALIGN_PAGE_MASK);
490 CC = BITTST(r7,TIF_SYSCALL_TRACE);
491 if CC JUMP _sys_trace;
493 /* Execute the appropriate system call */
496 p5.l = _sys_call_table;
497 p5.h = _sys_call_table;
514 r4.l = lo(ALIGN_PAGE_MASK);
515 r4.h = hi(ALIGN_PAGE_MASK);
516 r7 = r7 & r4; /* thread_info->flags */
518 .Lresume_userspace_1:
519 /* Disable interrupts. */
523 r7 = [p5 + TI_FLAGS];
524 r4.l = lo(_TIF_WORK_MASK);
525 r4.h = hi(_TIF_WORK_MASK);
529 cc = BITTST(r7, TIF_NEED_RESCHED);
530 if !cc jump .Lsyscall_sigpending;
532 /* Reenable interrupts. */
540 jump .Lresume_userspace_1;
542 .Lsyscall_sigpending:
543 cc = BITTST(r7, TIF_RESTORE_SIGMASK);
544 if cc jump .Lsyscall_do_signals;
545 cc = BITTST(r7, TIF_SIGPENDING);
546 if !cc jump .Lsyscall_really_exit;
547 .Lsyscall_do_signals:
548 /* Reenable interrupts. */
557 .Lsyscall_really_exit:
558 r5 = [sp + PT_RESERVED];
561 ENDPROC(_system_call)
566 /* Execute the appropriate system call */
569 p5.l = _sys_call_table;
570 p5.h = _sys_call_table;
589 jump .Lresume_userspace;
594 * Beware - when entering resume, prev (the current task) is
595 * in r0, next (the new task) is in r1.
601 [--sp] = (r7:4, p5:3);
605 [p0+(TASK_THREAD+THREAD_USP)] = p2;
607 /* save current kernel stack pointer */
608 [p0+(TASK_THREAD+THREAD_KSP)] = sp;
610 /* save program counter */
611 r1.l = _new_old_task;
612 r1.h = _new_old_task;
613 [p0+(TASK_THREAD+THREAD_PC)] = r1;
615 /* restore the kernel stack pointer */
616 sp = [p1+(TASK_THREAD+THREAD_KSP)];
618 /* restore user stack pointer */
619 p0 = [p1+(TASK_THREAD+THREAD_USP)];
623 p0 = [p1+(TASK_THREAD+THREAD_PC)];
627 * Following code actually lands up in a new (old) task.
631 (r7:4, p5:3) = [sp++];
636 * When we come out of resume, r0 carries "old" task, becuase we are
642 ENTRY(_ret_from_exception)
648 [sp + PT_IPEND] = r0;
654 if !cc jump 4f; /* if not return to user mode, get out */
656 /* Make sure any pending system call or deferred exception
657 * return in ILAT for this process to get executed, otherwise
658 * in case context switch happens, system call of
659 * first process (i.e in ILAT) will be carried
660 * forward to the switched process
666 r1 = (EVT_IVG14 | EVT_IVG15) (z);
671 /* Set the stack for the current process */
673 r4.l = lo(ALIGN_PAGE_MASK);
674 r4.h = hi(ALIGN_PAGE_MASK);
675 r7 = r7 & r4; /* thread_info->flags */
677 r7 = [p5 + TI_FLAGS];
678 r4.l = lo(_TIF_WORK_MASK);
679 r4.h = hi(_TIF_WORK_MASK);
686 p1.l = _schedule_and_signal;
687 p1.h = _schedule_and_signal;
690 raise 15; /* raise evt14 to do signal or reschedule */
697 ENDPROC(_ret_from_exception)
699 ENTRY(_return_from_int)
700 /* If someone else already raised IRQ 15, do nothing. */
705 cc = bittst (r0, EVT_IVG15_P);
708 /* if not return to user mode, get out */
722 /* Lower the interrupt level to 15. */
725 p1.l = _schedule_and_signal_from_int;
726 p1.h = _schedule_and_signal_from_int;
730 r0.l = _safe_speculative_execution;
731 r0.h = _safe_speculative_execution;
736 raise 15; /* raise evt15 to do signal or reschedule */
740 ENDPROC(_return_from_int)
742 ENTRY(_lower_to_irq14)
744 r0.l = _safe_speculative_execution;
745 r0.h = _safe_speculative_execution;
752 ENTRY(_evt14_softirq)
753 #ifdef CONFIG_DEBUG_HWERR
763 _schedule_and_signal_from_int:
764 /* To end up here, vector 15 was changed - so we have to change it
769 p1.l = _evt_system_call;
770 p1.h = _evt_system_call;
774 /* Set orig_p0 to -1 to indicate this isn't the end of a syscall. */
776 [sp + PT_ORIG_P0] = r0;
779 [sp + PT_RESERVED] = p1;
788 call _finish_atomic_sections;
790 jump.s .Lresume_userspace;
792 _schedule_and_signal:
794 /* To end up here, vector 15 was changed - so we have to change it
799 p1.l = _evt_system_call;
800 p1.h = _evt_system_call;
805 [sp + PT_RESERVED] = P0;
806 call .Lresume_userspace;
810 ENDPROC(_lower_to_irq14)
812 /* Make sure when we start, that the circular buffer is initialized properly
813 * R0 and P0 are call clobbered, so we can use them here.
815 ENTRY(_init_exception_buff)
817 p0.h = _in_ptr_excause;
818 p0.l = _in_ptr_excause;
820 p0.h = _out_ptr_excause;
821 p0.l = _out_ptr_excause;
824 ENDPROC(_init_exception_buff)
826 /* We handle this 100% in exception space - to reduce overhead
827 * Only potiential problem is if the software buffer gets swapped out of the
828 * CPLB table - then double fault. - so we don't let this happen in other places
830 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
831 ENTRY(_ex_trace_buff_full)
837 P5.L = _trace_buff_offset;
838 P5.H = _trace_buff_offset;
839 P3 = [P5]; /* trace_buff_offset */
843 R7 <<= 1; /* double, since we need to read twice */
845 R7 <<= 2; /* need to shift over again,
846 * to get the number of bytes */
849 R6 = ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*1024) - 1;
856 P2.L = _trace_buff_offset;
857 P2.H = _trace_buff_offset;
860 P2.L = _software_trace_buff;
861 P2.H = _software_trace_buff;
863 LSETUP (.Lstart, .Lend) LC0;
865 R7 = [P5]; /* read TBUF */
879 jump _bfin_return_from_exception;
880 ENDPROC(_ex_trace_buff_full)
882 #if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4
886 #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN */
887 ENTRY(_trace_buff_offset)
890 ENTRY(_software_trace_buff)
891 .rept ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*256);
894 #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */
896 #if CONFIG_EARLY_PRINTK
900 trace_buffer_stop(p0,r0);
902 /* Turn caches off, to ensure we don't get double exceptions */
904 P4.L = LO(IMEM_CONTROL);
905 P4.H = HI(IMEM_CONTROL);
907 R5 = [P4]; /* Control Register*/
908 BITCLR(R5,ENICPLB_P);
910 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
915 P4.L = LO(DMEM_CONTROL);
916 P4.H = HI(DMEM_CONTROL);
918 BITCLR(R5,ENDCPLB_P);
919 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
925 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
933 #endif /* CONFIG_EARLY_PRINTK */
936 * Put these in the kernel data section - that should always be covered by
937 * a CPLB. This is needed to ensure we don't get double fault conditions
940 #ifdef CONFIG_SYSCALL_TAB_L1
947 /* entry for each EXCAUSE[5:0]
948 * This table must be in sync with the table in ./kernel/traps.c
949 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
951 .long _ex_syscall /* 0x00 - User Defined - Linux Syscall */
952 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
953 .long _ex_replaceable /* 0x02 - User Defined */
954 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
955 .long _ex_trap_c /* 0x04 - User Defined - dump trace buffer */
956 .long _ex_replaceable /* 0x05 - User Defined */
957 .long _ex_replaceable /* 0x06 - User Defined */
958 .long _ex_replaceable /* 0x07 - User Defined */
959 .long _ex_replaceable /* 0x08 - User Defined */
960 .long _ex_replaceable /* 0x09 - User Defined */
961 .long _ex_replaceable /* 0x0A - User Defined */
962 .long _ex_replaceable /* 0x0B - User Defined */
963 .long _ex_replaceable /* 0x0C - User Defined */
964 .long _ex_replaceable /* 0x0D - User Defined */
965 .long _ex_replaceable /* 0x0E - User Defined */
966 .long _ex_replaceable /* 0x0F - User Defined */
967 .long _ex_single_step /* 0x10 - HW Single step */
968 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
969 .long _ex_trace_buff_full /* 0x11 - Trace Buffer Full */
971 .long _ex_trap_c /* 0x11 - Trace Buffer Full */
973 .long _ex_trap_c /* 0x12 - Reserved */
974 .long _ex_trap_c /* 0x13 - Reserved */
975 .long _ex_trap_c /* 0x14 - Reserved */
976 .long _ex_trap_c /* 0x15 - Reserved */
977 .long _ex_trap_c /* 0x16 - Reserved */
978 .long _ex_trap_c /* 0x17 - Reserved */
979 .long _ex_trap_c /* 0x18 - Reserved */
980 .long _ex_trap_c /* 0x19 - Reserved */
981 .long _ex_trap_c /* 0x1A - Reserved */
982 .long _ex_trap_c /* 0x1B - Reserved */
983 .long _ex_trap_c /* 0x1C - Reserved */
984 .long _ex_trap_c /* 0x1D - Reserved */
985 .long _ex_trap_c /* 0x1E - Reserved */
986 .long _ex_trap_c /* 0x1F - Reserved */
987 .long _ex_trap_c /* 0x20 - Reserved */
988 .long _ex_trap_c /* 0x21 - Undefined Instruction */
989 .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */
990 .long _ex_dviol /* 0x23 - Data CPLB Protection Violation */
991 .long _ex_trap_c /* 0x24 - Data access misaligned */
992 .long _ex_trap_c /* 0x25 - Unrecoverable Event */
993 .long _ex_dmiss /* 0x26 - Data CPLB Miss */
994 .long _ex_dmult /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */
995 .long _ex_trap_c /* 0x28 - Emulation Watchpoint */
996 .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */
997 .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */
998 .long _ex_trap_c /* 0x2B - Instruction CPLB protection Violation */
999 .long _ex_icplb_miss /* 0x2C - Instruction CPLB miss */
1000 .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */
1001 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
1002 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
1003 .long _ex_trap_c /* 0x2F - Reserved */
1004 .long _ex_trap_c /* 0x30 - Reserved */
1005 .long _ex_trap_c /* 0x31 - Reserved */
1006 .long _ex_trap_c /* 0x32 - Reserved */
1007 .long _ex_trap_c /* 0x33 - Reserved */
1008 .long _ex_trap_c /* 0x34 - Reserved */
1009 .long _ex_trap_c /* 0x35 - Reserved */
1010 .long _ex_trap_c /* 0x36 - Reserved */
1011 .long _ex_trap_c /* 0x37 - Reserved */
1012 .long _ex_trap_c /* 0x38 - Reserved */
1013 .long _ex_trap_c /* 0x39 - Reserved */
1014 .long _ex_trap_c /* 0x3A - Reserved */
1015 .long _ex_trap_c /* 0x3B - Reserved */
1016 .long _ex_trap_c /* 0x3C - Reserved */
1017 .long _ex_trap_c /* 0x3D - Reserved */
1018 .long _ex_trap_c /* 0x3E - Reserved */
1019 .long _ex_trap_c /* 0x3F - Reserved */
1022 ENTRY(_sys_call_table)
1023 .long _sys_restart_syscall /* 0 */
1028 .long _sys_open /* 5 */
1030 .long _sys_ni_syscall /* old waitpid */
1033 .long _sys_unlink /* 10 */
1038 .long _sys_chmod /* 15 */
1039 .long _sys_chown /* chown16 */
1040 .long _sys_ni_syscall /* old break syscall holder */
1041 .long _sys_ni_syscall /* old stat */
1043 .long _sys_getpid /* 20 */
1045 .long _sys_ni_syscall /* old umount */
1048 .long _sys_stime /* 25 */
1051 .long _sys_ni_syscall /* old fstat */
1053 .long _sys_ni_syscall /* old utime */ /* 30 */
1054 .long _sys_ni_syscall /* old stty syscall holder */
1055 .long _sys_ni_syscall /* old gtty syscall holder */
1058 .long _sys_ni_syscall /* 35 */ /* old ftime syscall holder */
1063 .long _sys_rmdir /* 40 */
1067 .long _sys_ni_syscall /* old prof syscall holder */
1068 .long _sys_brk /* 45 */
1071 .long _sys_ni_syscall /* old sys_signal */
1072 .long _sys_geteuid /* geteuid16 */
1073 .long _sys_getegid /* getegid16 */ /* 50 */
1075 .long _sys_umount /* recycled never used phys() */
1076 .long _sys_ni_syscall /* old lock syscall holder */
1078 .long _sys_fcntl /* 55 */
1079 .long _sys_ni_syscall /* old mpx syscall holder */
1081 .long _sys_ni_syscall /* old ulimit syscall holder */
1082 .long _sys_ni_syscall /* old old uname */
1083 .long _sys_umask /* 60 */
1088 .long _sys_getpgrp /* 65 */
1090 .long _sys_ni_syscall /* old sys_sigaction */
1093 .long _sys_setreuid /* setreuid16 */ /* 70 */
1094 .long _sys_setregid /* setregid16 */
1095 .long _sys_ni_syscall /* old sys_sigsuspend */
1096 .long _sys_ni_syscall /* old sys_sigpending */
1097 .long _sys_sethostname
1098 .long _sys_setrlimit /* 75 */
1099 .long _sys_ni_syscall /* old getrlimit */
1100 .long _sys_getrusage
1101 .long _sys_gettimeofday
1102 .long _sys_settimeofday
1103 .long _sys_getgroups /* getgroups16 */ /* 80 */
1104 .long _sys_setgroups /* setgroups16 */
1105 .long _sys_ni_syscall /* old_select */
1107 .long _sys_ni_syscall /* old lstat */
1108 .long _sys_readlink /* 85 */
1110 .long _sys_ni_syscall /* sys_swapon */
1112 .long _sys_ni_syscall /* old_readdir */
1113 .long _sys_ni_syscall /* sys_mmap */ /* 90 */
1116 .long _sys_ftruncate
1118 .long _sys_fchown /* fchown16 */ /* 95 */
1119 .long _sys_getpriority
1120 .long _sys_setpriority
1121 .long _sys_ni_syscall /* old profil syscall holder */
1123 .long _sys_fstatfs /* 100 */
1124 .long _sys_ni_syscall
1125 .long _sys_ni_syscall /* old sys_socketcall */
1127 .long _sys_setitimer
1128 .long _sys_getitimer /* 105 */
1132 .long _sys_ni_syscall /* old uname */
1133 .long _sys_ni_syscall /* iopl for i386 */ /* 110 */
1135 .long _sys_ni_syscall /* obsolete idle() syscall */
1136 .long _sys_ni_syscall /* vm86old for i386 */
1138 .long _sys_ni_syscall /* 115 */ /* sys_swapoff */
1140 .long _sys_ni_syscall /* old sys_ipc */
1142 .long _sys_ni_syscall /* old sys_sigreturn */
1143 .long _sys_clone /* 120 */
1144 .long _sys_setdomainname
1146 .long _sys_ni_syscall /* old sys_modify_ldt */
1148 .long _sys_ni_syscall /* 125 */ /* sys_mprotect */
1149 .long _sys_ni_syscall /* old sys_sigprocmask */
1150 .long _sys_ni_syscall /* old "creat_module" */
1151 .long _sys_init_module
1152 .long _sys_delete_module
1153 .long _sys_ni_syscall /* 130: old "get_kernel_syms" */
1158 .long _sys_ni_syscall /* 135 */ /* sys_sysfs */
1159 .long _sys_personality
1160 .long _sys_ni_syscall /* for afs_syscall */
1161 .long _sys_setfsuid /* setfsuid16 */
1162 .long _sys_setfsgid /* setfsgid16 */
1163 .long _sys_llseek /* 140 */
1165 .long _sys_ni_syscall /* sys_select */
1167 .long _sys_ni_syscall /* sys_msync */
1168 .long _sys_readv /* 145 */
1171 .long _sys_fdatasync
1173 .long _sys_ni_syscall /* 150 */ /* sys_mlock */
1174 .long _sys_ni_syscall /* sys_munlock */
1175 .long _sys_ni_syscall /* sys_mlockall */
1176 .long _sys_ni_syscall /* sys_munlockall */
1177 .long _sys_sched_setparam
1178 .long _sys_sched_getparam /* 155 */
1179 .long _sys_sched_setscheduler
1180 .long _sys_sched_getscheduler
1181 .long _sys_sched_yield
1182 .long _sys_sched_get_priority_max
1183 .long _sys_sched_get_priority_min /* 160 */
1184 .long _sys_sched_rr_get_interval
1185 .long _sys_nanosleep
1187 .long _sys_setresuid /* setresuid16 */
1188 .long _sys_getresuid /* getresuid16 */ /* 165 */
1189 .long _sys_ni_syscall /* for vm86 */
1190 .long _sys_ni_syscall /* old "query_module" */
1191 .long _sys_ni_syscall /* sys_poll */
1192 .long _sys_nfsservctl
1193 .long _sys_setresgid /* setresgid16 */ /* 170 */
1194 .long _sys_getresgid /* getresgid16 */
1196 .long _sys_rt_sigreturn
1197 .long _sys_rt_sigaction
1198 .long _sys_rt_sigprocmask /* 175 */
1199 .long _sys_rt_sigpending
1200 .long _sys_rt_sigtimedwait
1201 .long _sys_rt_sigqueueinfo
1202 .long _sys_rt_sigsuspend
1203 .long _sys_pread64 /* 180 */
1205 .long _sys_lchown /* lchown16 */
1208 .long _sys_capset /* 185 */
1209 .long _sys_sigaltstack
1211 .long _sys_ni_syscall /* streams1 */
1212 .long _sys_ni_syscall /* streams2 */
1213 .long _sys_vfork /* 190 */
1214 .long _sys_getrlimit
1216 .long _sys_truncate64
1217 .long _sys_ftruncate64
1218 .long _sys_stat64 /* 195 */
1223 .long _sys_getgid /* 200 */
1228 .long _sys_getgroups /* 205 */
1229 .long _sys_setgroups
1231 .long _sys_setresuid
1232 .long _sys_getresuid
1233 .long _sys_setresgid /* 210 */
1234 .long _sys_getresgid
1238 .long _sys_setfsuid /* 215 */
1240 .long _sys_pivot_root
1241 .long _sys_ni_syscall /* sys_mincore */
1242 .long _sys_ni_syscall /* sys_madvise */
1243 .long _sys_getdents64 /* 220 */
1245 .long _sys_ni_syscall /* reserved for TUX */
1246 .long _sys_ni_syscall
1248 .long _sys_readahead /* 225 */
1250 .long _sys_lsetxattr
1251 .long _sys_fsetxattr
1253 .long _sys_lgetxattr /* 230 */
1254 .long _sys_fgetxattr
1255 .long _sys_listxattr
1256 .long _sys_llistxattr
1257 .long _sys_flistxattr
1258 .long _sys_removexattr /* 235 */
1259 .long _sys_lremovexattr
1260 .long _sys_fremovexattr
1262 .long _sys_sendfile64
1263 .long _sys_futex /* 240 */
1264 .long _sys_sched_setaffinity
1265 .long _sys_sched_getaffinity
1266 .long _sys_ni_syscall /* sys_set_thread_area */
1267 .long _sys_ni_syscall /* sys_get_thread_area */
1268 .long _sys_io_setup /* 245 */
1269 .long _sys_io_destroy
1270 .long _sys_io_getevents
1271 .long _sys_io_submit
1272 .long _sys_io_cancel
1273 .long _sys_ni_syscall /* 250 */ /* sys_alloc_hugepages */
1274 .long _sys_ni_syscall /* sys_freec_hugepages */
1275 .long _sys_exit_group
1276 .long _sys_lookup_dcookie
1277 .long _sys_bfin_spinlock
1278 .long _sys_epoll_create /* 255 */
1279 .long _sys_epoll_ctl
1280 .long _sys_epoll_wait
1281 .long _sys_ni_syscall /* remap_file_pages */
1282 .long _sys_set_tid_address
1283 .long _sys_timer_create /* 260 */
1284 .long _sys_timer_settime
1285 .long _sys_timer_gettime
1286 .long _sys_timer_getoverrun
1287 .long _sys_timer_delete
1288 .long _sys_clock_settime /* 265 */
1289 .long _sys_clock_gettime
1290 .long _sys_clock_getres
1291 .long _sys_clock_nanosleep
1293 .long _sys_fstatfs64 /* 270 */
1296 .long _sys_fadvise64_64
1297 .long _sys_ni_syscall /* vserver */
1298 .long _sys_ni_syscall /* 275, mbind */
1299 .long _sys_ni_syscall /* get_mempolicy */
1300 .long _sys_ni_syscall /* set_mempolicy */
1302 .long _sys_mq_unlink
1303 .long _sys_mq_timedsend /* 280 */
1304 .long _sys_mq_timedreceive
1305 .long _sys_mq_notify
1306 .long _sys_mq_getsetattr
1307 .long _sys_ni_syscall /* kexec_load */
1308 .long _sys_waitid /* 285 */
1310 .long _sys_request_key
1312 .long _sys_ioprio_set
1313 .long _sys_ioprio_get /* 290 */
1314 .long _sys_inotify_init
1315 .long _sys_inotify_add_watch
1316 .long _sys_inotify_rm_watch
1317 .long _sys_ni_syscall /* migrate_pages */
1318 .long _sys_openat /* 295 */
1322 .long _sys_futimesat
1323 .long _sys_fstatat64 /* 300 */
1327 .long _sys_symlinkat
1328 .long _sys_readlinkat /* 305 */
1330 .long _sys_faccessat
1333 .long _sys_unshare /* 310 */
1334 .long _sys_sram_alloc
1335 .long _sys_sram_free
1336 .long _sys_dma_memcpy
1338 .long _sys_bind /* 315 */
1340 .long _sys_getpeername
1341 .long _sys_getsockname
1342 .long _sys_getsockopt
1343 .long _sys_listen /* 320 */
1348 .long _sys_sendmsg /* 325 */
1350 .long _sys_setsockopt
1353 .long _sys_socketpair /* 330 */
1358 .long _sys_msgget /* 335 */
1363 .long _sys_shmdt /* 340 */
1366 .long _sys_sync_file_range
1368 .long _sys_vmsplice /* 345 */
1369 .long _sys_epoll_pwait
1370 .long _sys_utimensat
1372 .long _sys_ni_syscall
1373 .long _sys_eventfd /* 350 */
1376 .long _sys_fadvise64
1377 .long _sys_set_robust_list
1378 .long _sys_get_robust_list /* 355 */
1379 .long _sys_fallocate
1380 .long _sys_semtimedop
1381 .rept NR_syscalls-(.-_sys_call_table)/4
1382 .long _sys_ni_syscall
1391 _exception_stack_top:
1393 #if ANOMALY_05000261
1394 /* Used by the assembly entry point to work around an anomaly. */
1395 _last_cplb_fault_retx:
1399 * Single instructions can have multiple faults, which need to be
1400 * handled by traps.c, in irq5. We store the exception cause to ensure
1401 * we don't miss a double fault condition
1403 ENTRY(_in_ptr_excause)
1405 ENTRY(_out_ptr_excause)
1408 ENTRY(_excause_circ_buf)