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.
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.
77 * Work around an anomaly: if we see a new DCPLB fault, return
78 * without doing anything. Then, if we get the same fault again,
81 p5.l = _last_cplb_fault_retx;
82 p5.h = _last_cplb_fault_retx;
87 if !cc jump _return_from_exception;
97 DEBUG_START_HWTRACE(p5, r7)
104 DEBUG_START_HWTRACE(p5, r7)
105 (R7:6,P5:4) = [sp++];
107 raise 15; /* invoked by TRAP #0, for sys call */
119 ENTRY(_ex_single_step)
123 if cc jump _return_from_exception
132 if !cc jump _ex_trap_c;
135 r6.h = _exception_to_level5;
136 r6.l = _exception_to_level5;
139 if !cc jump _ex_trap_c;
141 ENTRY(_return_from_exception)
142 DEBUG_START_HWTRACE(p5, r7)
149 (R7:6,P5:4) = [sp++];
155 ENTRY(_handle_bad_cplb)
156 /* To get here, we just tried and failed to change a CPLB
157 * so, handle things in trap_c (C code), by lowering to
158 * IRQ5, just like we normally do. Since this is not a
159 * "normal" return path, we have a do alot of stuff to
160 * the stack to get ready so, we can fall through - we
161 * need to make a CPLB exception look like a normal exception
164 DEBUG_START_HWTRACE(p5, r7)
167 [--sp] = (R7:6, P5:4);
169 ENTRY(_ex_replaceable)
173 /* Make sure we are not in a double fault */
178 if CC jump _double_fault;
180 /* Call C code (trap_c) to handle the exception, which most
181 * likely involves sending a signal to the current process.
182 * To avoid double faults, lower our priority to IRQ5 first.
184 P5.h = _exception_to_level5;
185 P5.l = _exception_to_level5;
191 /* Disable all interrupts, but make sure level 5 is enabled so
192 * we can switch to that level. Save the old mask. */
194 p4.l = _excpt_saved_imask;
195 p4.h = _excpt_saved_imask;
200 /* Save the excause into a circular buffer, in case the instruction
201 * which caused this excecptions causes others.
203 P5.l = _in_ptr_excause;
204 P5.h = _in_ptr_excause;
210 R6.l = _excause_circ_buf;
211 R6.h = _excause_circ_buf;
217 DEBUG_START_HWTRACE(p5, r7)
218 (R7:6,P5:4) = [sp++];
225 /* We just realized we got an exception, while we were processing a different
226 * exception. This is a unrecoverable event, so crash
229 /* Turn caches & protection off, to ensure we don't get any more
233 P4.L = LO(IMEM_CONTROL);
234 P4.H = HI(IMEM_CONTROL);
236 R5 = [P4]; /* Control Register*/
237 BITCLR(R5,ENICPLB_P);
238 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
243 P4.L = LO(DMEM_CONTROL);
244 P4.H = HI(DMEM_CONTROL);
246 BITCLR(R5,ENDCPLB_P);
247 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
252 /* Fix up the stack */
253 (R7:6,P5:4) = [sp++];
257 /* We should be out of the exception stack, and back down into
258 * kernel or user space stack
262 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
264 call _double_fault_c;
266 .L_double_fault_panic:
267 JUMP .L_double_fault_panic
269 ENDPROC(_double_fault)
271 ENTRY(_exception_to_level5)
274 /* Restore interrupt mask. We haven't pushed RETI, so this
275 * doesn't enable interrupts until we return from this handler. */
276 p4.l = _excpt_saved_imask;
277 p4.h = _excpt_saved_imask;
281 /* Restore the hardware error vector. */
292 r0 = [p2]; /* Read current IPEND */
293 [sp + PT_IPEND] = r0; /* Store IPEND */
295 /* Pop the excause from the circular buffer and push it on the stack
296 * (in the right place - if you change the location of SEQSTAT, you
297 * must change this offset.
300 P5.l = _out_ptr_excause;
301 P5.h = _out_ptr_excause;
307 R6.l = _excause_circ_buf;
308 R6.h = _excause_circ_buf;
314 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
319 /* See if anything else is in the exception buffer
320 * if there is, process it
322 P5.l = _out_ptr_excause;
323 P5.h = _out_ptr_excause;
324 P4.l = _in_ptr_excause;
325 P4.h = _in_ptr_excause;
329 if ! CC JUMP .L_excep_to_5_again
331 call _ret_from_exception;
334 ENDPROC(_exception_to_level5)
336 ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
337 /* Since the kernel stack can be anywhere, it's not guaranteed to be
338 * covered by a CPLB. Switch to an exception stack; use RETN as a
339 * scratch register (for want of a better option).
342 sp.l = _exception_stack_top;
343 sp.h = _exception_stack_top;
344 /* Try to deal with syscalls quickly. */
346 [--sp] = (R7:6, P5:4);
347 DEBUG_STOP_HWTRACE(p5, r7)
348 r7 = SEQSTAT; /* reason code is in bit 5:0 */
349 r6.l = lo(SEQSTAT_EXCAUSE);
350 r6.h = hi(SEQSTAT_EXCAUSE);
360 r7 = -ENOSYS; /* signextending enough */
361 [sp + PT_R0] = r7; /* return value from system call */
362 jump .Lsyscall_really_exit;
365 ENTRY(_kernel_execve)
368 r3 = SIZEOF_PTREGS / 4;
383 /* Success. Copy our temporary pt_regs to the top of the kernel
384 * stack and do a normal exception return.
387 r0 = (-KERNEL_STACK_SIZE) (x);
391 r0 = KERNEL_STACK_SIZE - 4 (z);
397 r3 = SIZEOF_PTREGS / 4;
403 if ! cc jump 0b (bp);
405 r0 = (KERNEL_STACK_SIZE - SIZEOF_PTREGS) (z);
410 [SP + PT_SYSCFG] = r0;
411 [p3 + (TASK_THREAD + THREAD_KSP)] = sp;
418 ENDPROC(_kernel_execve)
426 [sp + PT_IPEND] = r0;
428 /* Store RETS for now */
430 [sp + PT_RESERVED] = r0;
431 /* Set the stack for the current process */
433 r6.l = lo(ALIGN_PAGE_MASK);
434 r6.h = hi(ALIGN_PAGE_MASK);
435 r7 = r7 & r6; /* thread_info */
439 [p2+(TASK_THREAD+THREAD_KSP)] = sp;
441 /* Check the System Call */
443 /* System call number is passed in P0 */
446 if ! cc jump .Lbadsys;
448 /* are we tracing syscalls?*/
450 r6.l = lo(ALIGN_PAGE_MASK);
451 r6.h = hi(ALIGN_PAGE_MASK);
455 CC = BITTST(r7,TIF_SYSCALL_TRACE);
456 if CC JUMP _sys_trace;
458 /* Execute the appropriate system call */
461 p5.l = _sys_call_table;
462 p5.h = _sys_call_table;
479 r4.l = lo(ALIGN_PAGE_MASK);
480 r4.h = hi(ALIGN_PAGE_MASK);
481 r7 = r7 & r4; /* thread_info->flags */
483 .Lresume_userspace_1:
484 /* Disable interrupts. */
488 r7 = [p5 + TI_FLAGS];
489 r4.l = lo(_TIF_WORK_MASK);
490 r4.h = hi(_TIF_WORK_MASK);
494 cc = BITTST(r7, TIF_NEED_RESCHED);
495 if !cc jump .Lsyscall_sigpending;
497 /* Reenable interrupts. */
505 jump .Lresume_userspace_1;
507 .Lsyscall_sigpending:
508 cc = BITTST(r7, TIF_RESTORE_SIGMASK);
509 if cc jump .Lsyscall_do_signals;
510 cc = BITTST(r7, TIF_SIGPENDING);
511 if !cc jump .Lsyscall_really_exit;
512 .Lsyscall_do_signals:
513 /* Reenable interrupts. */
522 .Lsyscall_really_exit:
523 r5 = [sp + PT_RESERVED];
526 ENDPROC(_system_call)
531 /* Execute the appropriate system call */
534 p5.l = _sys_call_table;
535 p5.h = _sys_call_table;
554 jump .Lresume_userspace;
559 * Beware - when entering resume, prev (the current task) is
560 * in r0, next (the new task) is in r1.
566 [--sp] = (r7:4, p5:3);
570 [p0+(TASK_THREAD+THREAD_USP)] = p2;
572 /* save current kernel stack pointer */
573 [p0+(TASK_THREAD+THREAD_KSP)] = sp;
575 /* save program counter */
576 r1.l = _new_old_task;
577 r1.h = _new_old_task;
578 [p0+(TASK_THREAD+THREAD_PC)] = r1;
580 /* restore the kernel stack pointer */
581 sp = [p1+(TASK_THREAD+THREAD_KSP)];
583 /* restore user stack pointer */
584 p0 = [p1+(TASK_THREAD+THREAD_USP)];
588 p0 = [p1+(TASK_THREAD+THREAD_PC)];
592 * Following code actually lands up in a new (old) task.
596 (r7:4, p5:3) = [sp++];
601 * When we come out of resume, r0 carries "old" task, becuase we are
607 ENTRY(_ret_from_exception)
613 [sp + PT_IPEND] = r0;
621 if !cc jump 4f; /* if not return to user mode, get out */
623 /* Make sure any pending system call or deferred exception
624 * return in ILAT for this process to get executed, otherwise
625 * in case context switch happens, system call of
626 * first process (i.e in ILAT) will be carried
627 * forward to the switched process
633 r1 = (EVT_IVG14 | EVT_IVG15) (z);
638 /* Set the stack for the current process */
640 r4.l = lo(ALIGN_PAGE_MASK);
641 r4.h = hi(ALIGN_PAGE_MASK);
642 r7 = r7 & r4; /* thread_info->flags */
644 r7 = [p5 + TI_FLAGS];
645 r4.l = lo(_TIF_WORK_MASK);
646 r4.h = hi(_TIF_WORK_MASK);
653 p1.l = _schedule_and_signal;
654 p1.h = _schedule_and_signal;
657 raise 15; /* raise evt14 to do signal or reschedule */
664 ENDPROC(_ret_from_exception)
666 ENTRY(_return_from_int)
667 /* If someone else already raised IRQ 15, do nothing. */
672 cc = bittst (r0, EVT_IVG15_P);
675 /* if not return to user mode, get out */
689 /* Lower the interrupt level to 15. */
692 p1.l = _schedule_and_signal_from_int;
693 p1.h = _schedule_and_signal_from_int;
697 r0.l = _safe_speculative_execution;
698 r0.h = _safe_speculative_execution;
703 raise 15; /* raise evt15 to do signal or reschedule */
707 ENDPROC(_return_from_int)
709 ENTRY(_lower_to_irq14)
711 r0.l = _safe_speculative_execution;
712 r0.h = _safe_speculative_execution;
719 ENTRY(_evt14_softirq)
720 #ifdef CONFIG_DEBUG_HWERR
730 _schedule_and_signal_from_int:
731 /* To end up here, vector 15 was changed - so we have to change it
736 p1.l = _evt_system_call;
737 p1.h = _evt_system_call;
741 /* Set orig_p0 to -1 to indicate this isn't the end of a syscall. */
743 [sp + PT_ORIG_P0] = r0;
746 [sp + PT_RESERVED] = p1;
755 call _finish_atomic_sections;
757 jump.s .Lresume_userspace;
759 _schedule_and_signal:
761 /* To end up here, vector 15 was changed - so we have to change it
766 p1.l = _evt_system_call;
767 p1.h = _evt_system_call;
772 [sp + PT_RESERVED] = P0;
773 call .Lresume_userspace;
777 ENDPROC(_lower_to_irq14)
779 /* Make sure when we start, that the circular buffer is initialized properly
780 * R0 and P0 are call clobbered, so we can use them here.
782 ENTRY(_init_exception_buff)
784 p0.h = _in_ptr_excause;
785 p0.l = _in_ptr_excause;
787 p0.h = _out_ptr_excause;
788 p0.l = _out_ptr_excause;
791 ENDPROC(_init_exception_buff)
793 /* We handle this 100% in exception space - to reduce overhead
794 * Only potiential problem is if the software buffer gets swapped out of the
795 * CPLB table - then double fault. - so we don't let this happen in other places
797 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
798 ENTRY(_ex_trace_buff_full)
804 P5.L = _trace_buff_offset;
805 P5.H = _trace_buff_offset;
806 P3 = [P5]; /* trace_buff_offset */
810 R7 <<= 1; /* double, since we need to read twice */
812 R7 <<= 2; /* need to shift over again,
813 * to get the number of bytes */
816 R6 = ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*1024) - 1;
823 P2.L = _trace_buff_offset;
824 P2.H = _trace_buff_offset;
827 P2.L = _software_trace_buff;
828 P2.H = _software_trace_buff;
830 LSETUP (.Lstart, .Lend) LC0;
832 R7 = [P5]; /* read TBUF */
846 jump _return_from_exception;
847 ENDPROC(_ex_trace_buff_full)
849 #if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4
853 #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN */
854 ENTRY(_trace_buff_offset)
857 ENTRY(_software_trace_buff)
858 .rept ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*256);
861 #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */
863 #if CONFIG_EARLY_PRINTK
867 trace_buffer_stop(p0,r0);
869 /* Turn caches off, to ensure we don't get double exceptions */
871 P4.L = LO(IMEM_CONTROL);
872 P4.H = HI(IMEM_CONTROL);
874 R5 = [P4]; /* Control Register*/
875 BITCLR(R5,ENICPLB_P);
877 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
882 P4.L = LO(DMEM_CONTROL);
883 P4.H = HI(DMEM_CONTROL);
885 BITCLR(R5,ENDCPLB_P);
886 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
892 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
899 #endif /* CONFIG_EARLY_PRINTK */
902 * Put these in the kernel data section - that should always be covered by
903 * a CPLB. This is needed to ensure we don't get double fault conditions
906 #ifdef CONFIG_SYSCALL_TAB_L1
912 /* entry for each EXCAUSE[5:0]
913 * This table must be in sync with the table in ./kernel/traps.c
914 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
916 .long _ex_syscall /* 0x00 - User Defined - Linux Syscall */
917 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
918 .long _ex_replaceable /* 0x02 - User Defined */
919 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
920 .long _ex_replaceable /* 0x04 - User Defined */
921 .long _ex_replaceable /* 0x05 - User Defined */
922 .long _ex_replaceable /* 0x06 - User Defined */
923 .long _ex_replaceable /* 0x07 - User Defined */
924 .long _ex_replaceable /* 0x08 - User Defined */
925 .long _ex_replaceable /* 0x09 - User Defined */
926 .long _ex_replaceable /* 0x0A - User Defined */
927 .long _ex_replaceable /* 0x0B - User Defined */
928 .long _ex_replaceable /* 0x0C - User Defined */
929 .long _ex_replaceable /* 0x0D - User Defined */
930 .long _ex_replaceable /* 0x0E - User Defined */
931 .long _ex_replaceable /* 0x0F - User Defined */
932 .long _ex_single_step /* 0x10 - HW Single step */
933 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
934 .long _ex_trace_buff_full /* 0x11 - Trace Buffer Full */
936 .long _ex_trap_c /* 0x11 - Trace Buffer Full */
938 .long _ex_trap_c /* 0x12 - Reserved */
939 .long _ex_trap_c /* 0x13 - Reserved */
940 .long _ex_trap_c /* 0x14 - Reserved */
941 .long _ex_trap_c /* 0x15 - Reserved */
942 .long _ex_trap_c /* 0x16 - Reserved */
943 .long _ex_trap_c /* 0x17 - Reserved */
944 .long _ex_trap_c /* 0x18 - Reserved */
945 .long _ex_trap_c /* 0x19 - Reserved */
946 .long _ex_trap_c /* 0x1A - Reserved */
947 .long _ex_trap_c /* 0x1B - Reserved */
948 .long _ex_trap_c /* 0x1C - Reserved */
949 .long _ex_trap_c /* 0x1D - Reserved */
950 .long _ex_trap_c /* 0x1E - Reserved */
951 .long _ex_trap_c /* 0x1F - Reserved */
952 .long _ex_trap_c /* 0x20 - Reserved */
953 .long _ex_trap_c /* 0x21 - Undefined Instruction */
954 .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */
955 .long _ex_dcplb /* 0x23 - Data CPLB Protection Violation */
956 .long _ex_trap_c /* 0x24 - Data access misaligned */
957 .long _ex_trap_c /* 0x25 - Unrecoverable Event */
958 .long _ex_dcplb /* 0x26 - Data CPLB Miss */
959 .long _ex_trap_c /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */
960 .long _ex_trap_c /* 0x28 - Emulation Watchpoint */
961 .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */
962 .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */
963 .long _ex_icplb /* 0x2B - Instruction CPLB protection Violation */
964 .long _ex_icplb /* 0x2C - Instruction CPLB miss */
965 .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */
966 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
967 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
968 .long _ex_trap_c /* 0x2F - Reserved */
969 .long _ex_trap_c /* 0x30 - Reserved */
970 .long _ex_trap_c /* 0x31 - Reserved */
971 .long _ex_trap_c /* 0x32 - Reserved */
972 .long _ex_trap_c /* 0x33 - Reserved */
973 .long _ex_trap_c /* 0x34 - Reserved */
974 .long _ex_trap_c /* 0x35 - Reserved */
975 .long _ex_trap_c /* 0x36 - Reserved */
976 .long _ex_trap_c /* 0x37 - Reserved */
977 .long _ex_trap_c /* 0x38 - Reserved */
978 .long _ex_trap_c /* 0x39 - Reserved */
979 .long _ex_trap_c /* 0x3A - Reserved */
980 .long _ex_trap_c /* 0x3B - Reserved */
981 .long _ex_trap_c /* 0x3C - Reserved */
982 .long _ex_trap_c /* 0x3D - Reserved */
983 .long _ex_trap_c /* 0x3E - Reserved */
984 .long _ex_trap_c /* 0x3F - Reserved */
987 ENTRY(_sys_call_table)
988 .long _sys_restart_syscall /* 0 */
993 .long _sys_open /* 5 */
995 .long _sys_ni_syscall /* old waitpid */
998 .long _sys_unlink /* 10 */
1003 .long _sys_chmod /* 15 */
1004 .long _sys_chown /* chown16 */
1005 .long _sys_ni_syscall /* old break syscall holder */
1006 .long _sys_ni_syscall /* old stat */
1008 .long _sys_getpid /* 20 */
1010 .long _sys_ni_syscall /* old umount */
1013 .long _sys_stime /* 25 */
1016 .long _sys_ni_syscall /* old fstat */
1018 .long _sys_ni_syscall /* old utime */ /* 30 */
1019 .long _sys_ni_syscall /* old stty syscall holder */
1020 .long _sys_ni_syscall /* old gtty syscall holder */
1023 .long _sys_ni_syscall /* 35 */ /* old ftime syscall holder */
1028 .long _sys_rmdir /* 40 */
1032 .long _sys_ni_syscall /* old prof syscall holder */
1033 .long _sys_brk /* 45 */
1036 .long _sys_ni_syscall /* old sys_signal */
1037 .long _sys_geteuid /* geteuid16 */
1038 .long _sys_getegid /* getegid16 */ /* 50 */
1040 .long _sys_umount /* recycled never used phys() */
1041 .long _sys_ni_syscall /* old lock syscall holder */
1043 .long _sys_fcntl /* 55 */
1044 .long _sys_ni_syscall /* old mpx syscall holder */
1046 .long _sys_ni_syscall /* old ulimit syscall holder */
1047 .long _sys_ni_syscall /* old old uname */
1048 .long _sys_umask /* 60 */
1053 .long _sys_getpgrp /* 65 */
1055 .long _sys_ni_syscall /* old sys_sigaction */
1058 .long _sys_setreuid /* setreuid16 */ /* 70 */
1059 .long _sys_setregid /* setregid16 */
1060 .long _sys_ni_syscall /* old sys_sigsuspend */
1061 .long _sys_ni_syscall /* old sys_sigpending */
1062 .long _sys_sethostname
1063 .long _sys_setrlimit /* 75 */
1064 .long _sys_ni_syscall /* old getrlimit */
1065 .long _sys_getrusage
1066 .long _sys_gettimeofday
1067 .long _sys_settimeofday
1068 .long _sys_getgroups /* getgroups16 */ /* 80 */
1069 .long _sys_setgroups /* setgroups16 */
1070 .long _sys_ni_syscall /* old_select */
1072 .long _sys_ni_syscall /* old lstat */
1073 .long _sys_readlink /* 85 */
1075 .long _sys_ni_syscall /* sys_swapon */
1077 .long _sys_ni_syscall /* old_readdir */
1078 .long _sys_ni_syscall /* sys_mmap */ /* 90 */
1081 .long _sys_ftruncate
1083 .long _sys_fchown /* fchown16 */ /* 95 */
1084 .long _sys_getpriority
1085 .long _sys_setpriority
1086 .long _sys_ni_syscall /* old profil syscall holder */
1088 .long _sys_fstatfs /* 100 */
1089 .long _sys_ni_syscall
1090 .long _sys_ni_syscall /* old sys_socketcall */
1092 .long _sys_setitimer
1093 .long _sys_getitimer /* 105 */
1097 .long _sys_ni_syscall /* old uname */
1098 .long _sys_ni_syscall /* iopl for i386 */ /* 110 */
1100 .long _sys_ni_syscall /* obsolete idle() syscall */
1101 .long _sys_ni_syscall /* vm86old for i386 */
1103 .long _sys_ni_syscall /* 115 */ /* sys_swapoff */
1105 .long _sys_ni_syscall /* old sys_ipc */
1107 .long _sys_ni_syscall /* old sys_sigreturn */
1108 .long _sys_clone /* 120 */
1109 .long _sys_setdomainname
1111 .long _sys_ni_syscall /* old sys_modify_ldt */
1113 .long _sys_ni_syscall /* 125 */ /* sys_mprotect */
1114 .long _sys_ni_syscall /* old sys_sigprocmask */
1115 .long _sys_ni_syscall /* old "creat_module" */
1116 .long _sys_init_module
1117 .long _sys_delete_module
1118 .long _sys_ni_syscall /* 130: old "get_kernel_syms" */
1123 .long _sys_ni_syscall /* 135 */ /* sys_sysfs */
1124 .long _sys_personality
1125 .long _sys_ni_syscall /* for afs_syscall */
1126 .long _sys_setfsuid /* setfsuid16 */
1127 .long _sys_setfsgid /* setfsgid16 */
1128 .long _sys_llseek /* 140 */
1130 .long _sys_ni_syscall /* sys_select */
1132 .long _sys_ni_syscall /* sys_msync */
1133 .long _sys_readv /* 145 */
1136 .long _sys_fdatasync
1138 .long _sys_ni_syscall /* 150 */ /* sys_mlock */
1139 .long _sys_ni_syscall /* sys_munlock */
1140 .long _sys_ni_syscall /* sys_mlockall */
1141 .long _sys_ni_syscall /* sys_munlockall */
1142 .long _sys_sched_setparam
1143 .long _sys_sched_getparam /* 155 */
1144 .long _sys_sched_setscheduler
1145 .long _sys_sched_getscheduler
1146 .long _sys_sched_yield
1147 .long _sys_sched_get_priority_max
1148 .long _sys_sched_get_priority_min /* 160 */
1149 .long _sys_sched_rr_get_interval
1150 .long _sys_nanosleep
1152 .long _sys_setresuid /* setresuid16 */
1153 .long _sys_getresuid /* getresuid16 */ /* 165 */
1154 .long _sys_ni_syscall /* for vm86 */
1155 .long _sys_ni_syscall /* old "query_module" */
1156 .long _sys_ni_syscall /* sys_poll */
1157 .long _sys_nfsservctl
1158 .long _sys_setresgid /* setresgid16 */ /* 170 */
1159 .long _sys_getresgid /* getresgid16 */
1161 .long _sys_rt_sigreturn
1162 .long _sys_rt_sigaction
1163 .long _sys_rt_sigprocmask /* 175 */
1164 .long _sys_rt_sigpending
1165 .long _sys_rt_sigtimedwait
1166 .long _sys_rt_sigqueueinfo
1167 .long _sys_rt_sigsuspend
1168 .long _sys_pread64 /* 180 */
1170 .long _sys_lchown /* lchown16 */
1173 .long _sys_capset /* 185 */
1174 .long _sys_sigaltstack
1176 .long _sys_ni_syscall /* streams1 */
1177 .long _sys_ni_syscall /* streams2 */
1178 .long _sys_vfork /* 190 */
1179 .long _sys_getrlimit
1181 .long _sys_truncate64
1182 .long _sys_ftruncate64
1183 .long _sys_stat64 /* 195 */
1188 .long _sys_getgid /* 200 */
1193 .long _sys_getgroups /* 205 */
1194 .long _sys_setgroups
1196 .long _sys_setresuid
1197 .long _sys_getresuid
1198 .long _sys_setresgid /* 210 */
1199 .long _sys_getresgid
1203 .long _sys_setfsuid /* 215 */
1205 .long _sys_pivot_root
1206 .long _sys_ni_syscall /* sys_mincore */
1207 .long _sys_ni_syscall /* sys_madvise */
1208 .long _sys_getdents64 /* 220 */
1210 .long _sys_ni_syscall /* reserved for TUX */
1211 .long _sys_ni_syscall
1213 .long _sys_readahead /* 225 */
1215 .long _sys_lsetxattr
1216 .long _sys_fsetxattr
1218 .long _sys_lgetxattr /* 230 */
1219 .long _sys_fgetxattr
1220 .long _sys_listxattr
1221 .long _sys_llistxattr
1222 .long _sys_flistxattr
1223 .long _sys_removexattr /* 235 */
1224 .long _sys_lremovexattr
1225 .long _sys_fremovexattr
1227 .long _sys_sendfile64
1228 .long _sys_futex /* 240 */
1229 .long _sys_sched_setaffinity
1230 .long _sys_sched_getaffinity
1231 .long _sys_ni_syscall /* sys_set_thread_area */
1232 .long _sys_ni_syscall /* sys_get_thread_area */
1233 .long _sys_io_setup /* 245 */
1234 .long _sys_io_destroy
1235 .long _sys_io_getevents
1236 .long _sys_io_submit
1237 .long _sys_io_cancel
1238 .long _sys_ni_syscall /* 250 */ /* sys_alloc_hugepages */
1239 .long _sys_ni_syscall /* sys_freec_hugepages */
1240 .long _sys_exit_group
1241 .long _sys_lookup_dcookie
1242 .long _sys_bfin_spinlock
1243 .long _sys_epoll_create /* 255 */
1244 .long _sys_epoll_ctl
1245 .long _sys_epoll_wait
1246 .long _sys_ni_syscall /* remap_file_pages */
1247 .long _sys_set_tid_address
1248 .long _sys_timer_create /* 260 */
1249 .long _sys_timer_settime
1250 .long _sys_timer_gettime
1251 .long _sys_timer_getoverrun
1252 .long _sys_timer_delete
1253 .long _sys_clock_settime /* 265 */
1254 .long _sys_clock_gettime
1255 .long _sys_clock_getres
1256 .long _sys_clock_nanosleep
1258 .long _sys_fstatfs64 /* 270 */
1261 .long _sys_fadvise64_64
1262 .long _sys_ni_syscall /* vserver */
1263 .long _sys_ni_syscall /* 275, mbind */
1264 .long _sys_ni_syscall /* get_mempolicy */
1265 .long _sys_ni_syscall /* set_mempolicy */
1267 .long _sys_mq_unlink
1268 .long _sys_mq_timedsend /* 280 */
1269 .long _sys_mq_timedreceive
1270 .long _sys_mq_notify
1271 .long _sys_mq_getsetattr
1272 .long _sys_ni_syscall /* kexec_load */
1273 .long _sys_waitid /* 285 */
1275 .long _sys_request_key
1277 .long _sys_ioprio_set
1278 .long _sys_ioprio_get /* 290 */
1279 .long _sys_inotify_init
1280 .long _sys_inotify_add_watch
1281 .long _sys_inotify_rm_watch
1282 .long _sys_ni_syscall /* migrate_pages */
1283 .long _sys_openat /* 295 */
1287 .long _sys_futimesat
1288 .long _sys_fstatat64 /* 300 */
1292 .long _sys_symlinkat
1293 .long _sys_readlinkat /* 305 */
1295 .long _sys_faccessat
1298 .long _sys_unshare /* 310 */
1299 .long _sys_sram_alloc
1300 .long _sys_sram_free
1301 .long _sys_dma_memcpy
1303 .long _sys_bind /* 315 */
1305 .long _sys_getpeername
1306 .long _sys_getsockname
1307 .long _sys_getsockopt
1308 .long _sys_listen /* 320 */
1313 .long _sys_sendmsg /* 325 */
1315 .long _sys_setsockopt
1318 .long _sys_socketpair /* 330 */
1323 .long _sys_msgget /* 335 */
1328 .long _sys_shmdt /* 340 */
1331 .long _sys_sync_file_range
1333 .long _sys_vmsplice /* 345 */
1334 .long _sys_epoll_pwait
1335 .long _sys_utimensat
1338 .long _sys_eventfd /* 350 */
1341 .long _sys_fadvise64
1342 .long _sys_set_robust_list
1343 .long _sys_get_robust_list /* 355 */
1344 .long _sys_fallocate
1345 .rept NR_syscalls-(.-_sys_call_table)/4
1346 .long _sys_ni_syscall
1355 _exception_stack_top:
1357 #if ANOMALY_05000261
1358 /* Used by the assembly entry point to work around an anomaly. */
1359 _last_cplb_fault_retx:
1363 * Single instructions can have multiple faults, which need to be
1364 * handled by traps.c, in irq5. We store the exception cause to ensure
1365 * we don't miss a double fault condition
1367 ENTRY(_in_ptr_excause)
1369 ENTRY(_out_ptr_excause)
1372 ENTRY(_excause_circ_buf)