038f70e0be65cb4adcb1ada19b07f6d75eba7d8b
[deliverable/linux.git] / arch / blackfin / mach-common / entry.S
1 /*
2 * File: arch/blackfin/mach-common/entry.S
3 * Based on:
4 * Author: Linus Torvalds
5 *
6 * Created: ?
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.
10 *
11 * Modified:
12 * Copyright 2004-2006 Analog Devices Inc.
13 *
14 * Bugs: Enter bugs at http://blackfin.uclinux.org/
15 *
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.
20 *
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.
25 *
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
30 */
31
32 /* NOTE: This code handles signal-recognition, which happens every time
33 * after a timer-interrupt and after each system call.
34 */
35
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/fixed_code.h>
42 #include <asm/thread_info.h> /* TIF_NEED_RESCHED */
43 #include <asm/asm-offsets.h>
44 #include <asm/trace.h>
45
46 #include <asm/mach-common/context.S>
47
48 #if defined(CONFIG_BFIN_SCRATCH_REG_RETN)
49 # define EX_SCRATCH_REG RETN
50 #elif defined(CONFIG_BFIN_SCRATCH_REG_RETE)
51 # define EX_SCRATCH_REG RETE
52 #else
53 # define EX_SCRATCH_REG CYCLES
54 #endif
55
56 #ifdef CONFIG_EXCPT_IRQ_SYSC_L1
57 .section .l1.text
58 #else
59 .text
60 #endif
61
62 /* Slightly simplified and streamlined entry point for CPLB misses.
63 * This one does not lower the level to IRQ5, and thus can be used to
64 * patch up CPLB misses on the kernel stack.
65 */
66 #if ANOMALY_05000261
67 #define _ex_dviol _ex_workaround_261
68 #define _ex_dmiss _ex_workaround_261
69 #define _ex_dmult _ex_workaround_261
70
71 ENTRY(_ex_workaround_261)
72 /*
73 * Work around an anomaly: if we see a new DCPLB fault, return
74 * without doing anything. Then, if we get the same fault again,
75 * handle it.
76 */
77 P4 = R7; /* Store EXCAUSE */
78 p5.l = _last_cplb_fault_retx;
79 p5.h = _last_cplb_fault_retx;
80 r7 = [p5];
81 r6 = retx;
82 [p5] = r6;
83 cc = r6 == r7;
84 if !cc jump _bfin_return_from_exception;
85 /* fall through */
86 R7 = P4;
87 R6 = 0x26; /* Data CPLB Miss */
88 cc = R6 == R7;
89 if cc jump _ex_dcplb_miss (BP);
90 R6 = 0x23; /* Data CPLB Miss */
91 cc = R6 == R7;
92 if cc jump _ex_dcplb_viol (BP);
93 /* Handle 0x23 Data CPLB Protection Violation
94 * and Data CPLB Multiple Hits - Linux Trap Zero
95 */
96 jump _ex_trap_c;
97 ENDPROC(_ex_workaround_261)
98
99 #else
100 #ifdef CONFIG_MPU
101 #define _ex_dviol _ex_dcplb_viol
102 #else
103 #define _ex_dviol _ex_trap_c
104 #endif
105 #define _ex_dmiss _ex_dcplb_miss
106 #define _ex_dmult _ex_trap_c
107 #endif
108
109
110 ENTRY(_ex_dcplb_viol)
111 ENTRY(_ex_dcplb_miss)
112 ENTRY(_ex_icplb_miss)
113 (R7:6,P5:4) = [sp++];
114 ASTAT = [sp++];
115 SAVE_ALL_SYS
116 #ifdef CONFIG_MPU
117 /* We must load R1 here, _before_ DEBUG_HWTRACE_SAVE, since that
118 * will change the stack pointer. */
119 R0 = SEQSTAT;
120 R1 = SP;
121 #endif
122 DEBUG_HWTRACE_SAVE(p5, r7)
123 #ifdef CONFIG_MPU
124 sp += -12;
125 call _cplb_hdr;
126 sp += 12;
127 CC = R0 == 0;
128 IF !CC JUMP _handle_bad_cplb;
129 #else
130 call __cplb_hdr;
131 #endif
132 DEBUG_HWTRACE_RESTORE(p5, r7)
133 RESTORE_ALL_SYS
134 SP = EX_SCRATCH_REG;
135 rtx;
136 ENDPROC(_ex_icplb_miss)
137
138 ENTRY(_ex_syscall)
139 (R7:6,P5:4) = [sp++];
140 ASTAT = [sp++];
141 raise 15; /* invoked by TRAP #0, for sys call */
142 sp = EX_SCRATCH_REG;
143 rtx
144 ENDPROC(_ex_syscall)
145
146 ENTRY(_ex_soft_bp)
147 r7 = retx;
148 r7 += -2;
149 retx = r7;
150 jump.s _ex_trap_c;
151 ENDPROC(_ex_soft_bp)
152
153 ENTRY(_ex_single_step)
154 /* If we just returned from an interrupt, the single step event is
155 for the RTI instruction. */
156 r7 = retx;
157 r6 = reti;
158 cc = r7 == r6;
159 if cc jump _bfin_return_from_exception;
160
161 /* If we were in user mode, do the single step normally. */
162 p5.l = lo(IPEND);
163 p5.h = hi(IPEND);
164 r6 = [p5];
165 r7 = 0xffe0 (z);
166 r7 = r7 & r6;
167 cc = r7 == 0;
168 if !cc jump 1f;
169
170 /* Single stepping only a single instruction, so clear the trace
171 * bit here. */
172 r7 = syscfg;
173 bitclr (r7, 0);
174 syscfg = R7;
175 jump _ex_trap_c;
176
177 1:
178 /*
179 * We were in an interrupt handler. By convention, all of them save
180 * SYSCFG with their first instruction, so by checking whether our
181 * RETX points at the entry point, we can determine whether to allow
182 * a single step, or whether to clear SYSCFG.
183 *
184 * First, find out the interrupt level and the event vector for it.
185 */
186 p5.l = lo(EVT0);
187 p5.h = hi(EVT0);
188 p5 += -4;
189 2:
190 r7 = rot r7 by -1;
191 p5 += 4;
192 if !cc jump 2b;
193
194 /* What we actually do is test for the _second_ instruction in the
195 * IRQ handler. That way, if there are insns following the restore
196 * of SYSCFG after leaving the handler, we will not turn off SYSCFG
197 * for them. */
198
199 r7 = [p5];
200 r7 += 2;
201 r6 = RETX;
202 cc = R7 == R6;
203 if !cc jump _bfin_return_from_exception;
204
205 r7 = syscfg;
206 bitclr (r7, 0);
207 syscfg = R7;
208
209 /* Fall through to _bfin_return_from_exception. */
210 ENDPROC(_ex_single_step)
211
212 ENTRY(_bfin_return_from_exception)
213 #if ANOMALY_05000257
214 R7=LC0;
215 LC0=R7;
216 R7=LC1;
217 LC1=R7;
218 #endif
219 (R7:6,P5:4) = [sp++];
220 ASTAT = [sp++];
221 sp = EX_SCRATCH_REG;
222 rtx;
223 ENDPROC(_bfin_return_from_exception)
224
225 ENTRY(_handle_bad_cplb)
226 DEBUG_HWTRACE_RESTORE(p5, r7)
227 /* To get here, we just tried and failed to change a CPLB
228 * so, handle things in trap_c (C code), by lowering to
229 * IRQ5, just like we normally do. Since this is not a
230 * "normal" return path, we have a do alot of stuff to
231 * the stack to get ready so, we can fall through - we
232 * need to make a CPLB exception look like a normal exception
233 */
234
235 RESTORE_ALL_SYS
236 [--sp] = ASTAT;
237 [--sp] = (R7:6,P5:4);
238
239 ENTRY(_ex_replaceable)
240 nop;
241
242 ENTRY(_ex_trap_c)
243 /* Make sure we are not in a double fault */
244 p4.l = lo(IPEND);
245 p4.h = hi(IPEND);
246 r7 = [p4];
247 CC = BITTST (r7, 5);
248 if CC jump _double_fault;
249
250 /* Call C code (trap_c) to handle the exception, which most
251 * likely involves sending a signal to the current process.
252 * To avoid double faults, lower our priority to IRQ5 first.
253 */
254 P5.h = _exception_to_level5;
255 P5.l = _exception_to_level5;
256 p4.l = lo(EVT5);
257 p4.h = hi(EVT5);
258 [p4] = p5;
259 csync;
260
261 p4.l = lo(DCPLB_FAULT_ADDR);
262 p4.h = hi(DCPLB_FAULT_ADDR);
263 r7 = [p4];
264 p5.h = _saved_dcplb_fault_addr;
265 p5.l = _saved_dcplb_fault_addr;
266 [p5] = r7;
267
268 r7 = [p4 + (ICPLB_FAULT_ADDR - DCPLB_FAULT_ADDR)];
269 p5.h = _saved_icplb_fault_addr;
270 p5.l = _saved_icplb_fault_addr;
271 [p5] = r7;
272
273 p4.l = _excpt_saved_stuff;
274 p4.h = _excpt_saved_stuff;
275
276 r6 = retx;
277 [p4] = r6;
278
279 r6 = SYSCFG;
280 [p4 + 4] = r6;
281 BITCLR(r6, 0);
282 SYSCFG = r6;
283
284 /* Disable all interrupts, but make sure level 5 is enabled so
285 * we can switch to that level. Save the old mask. */
286 cli r6;
287 [p4 + 8] = r6;
288
289 p4.l = lo(SAFE_USER_INSTRUCTION);
290 p4.h = hi(SAFE_USER_INSTRUCTION);
291 retx = p4;
292
293 r6 = 0x3f;
294 sti r6;
295
296 (R7:6,P5:4) = [sp++];
297 ASTAT = [sp++];
298 SP = EX_SCRATCH_REG;
299 raise 5;
300 rtx;
301 ENDPROC(_ex_trap_c)
302
303 /* We just realized we got an exception, while we were processing a different
304 * exception. This is a unrecoverable event, so crash
305 */
306 ENTRY(_double_fault)
307 /* Turn caches & protection off, to ensure we don't get any more
308 * double exceptions
309 */
310
311 P4.L = LO(IMEM_CONTROL);
312 P4.H = HI(IMEM_CONTROL);
313
314 R5 = [P4]; /* Control Register*/
315 BITCLR(R5,ENICPLB_P);
316 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
317 .align 8;
318 [P4] = R5;
319 SSYNC;
320
321 P4.L = LO(DMEM_CONTROL);
322 P4.H = HI(DMEM_CONTROL);
323 R5 = [P4];
324 BITCLR(R5,ENDCPLB_P);
325 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
326 .align 8;
327 [P4] = R5;
328 SSYNC;
329
330 /* Fix up the stack */
331 (R7:6,P5:4) = [sp++];
332 ASTAT = [sp++];
333 SP = EX_SCRATCH_REG;
334
335 /* We should be out of the exception stack, and back down into
336 * kernel or user space stack
337 */
338 SAVE_ALL_SYS
339
340 /* The dumping functions expect the return address in the RETI
341 * slot. */
342 r6 = retx;
343 [sp + PT_PC] = r6;
344
345 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
346 SP += -12;
347 call _double_fault_c;
348 SP += 12;
349 .L_double_fault_panic:
350 JUMP .L_double_fault_panic
351
352 ENDPROC(_double_fault)
353
354 ENTRY(_exception_to_level5)
355 SAVE_ALL_SYS
356
357 p4.l = _excpt_saved_stuff;
358 p4.h = _excpt_saved_stuff;
359 r6 = [p4];
360 [sp + PT_PC] = r6;
361
362 r6 = [p4 + 4];
363 [sp + PT_SYSCFG] = r6;
364
365 /* Restore interrupt mask. We haven't pushed RETI, so this
366 * doesn't enable interrupts until we return from this handler. */
367 r6 = [p4 + 8];
368 sti r6;
369
370 /* Restore the hardware error vector. */
371 P5.h = _evt_ivhw;
372 P5.l = _evt_ivhw;
373 p4.l = lo(EVT5);
374 p4.h = hi(EVT5);
375 [p4] = p5;
376 csync;
377
378 p2.l = lo(IPEND);
379 p2.h = hi(IPEND);
380 csync;
381 r0 = [p2]; /* Read current IPEND */
382 [sp + PT_IPEND] = r0; /* Store IPEND */
383
384 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
385 SP += -12;
386 call _trap_c;
387 SP += 12;
388
389 call _ret_from_exception;
390 RESTORE_ALL_SYS
391 rti;
392 ENDPROC(_exception_to_level5)
393
394 ENTRY(_trap) /* Exception: 4th entry into system event table(supervisor mode)*/
395 /* Since the kernel stack can be anywhere, it's not guaranteed to be
396 * covered by a CPLB. Switch to an exception stack; use RETN as a
397 * scratch register (for want of a better option).
398 */
399 EX_SCRATCH_REG = sp;
400 sp.l = _exception_stack_top;
401 sp.h = _exception_stack_top;
402 /* Try to deal with syscalls quickly. */
403 [--sp] = ASTAT;
404 [--sp] = (R7:6,P5:4);
405 r7 = SEQSTAT; /* reason code is in bit 5:0 */
406 r6.l = lo(SEQSTAT_EXCAUSE);
407 r6.h = hi(SEQSTAT_EXCAUSE);
408 r7 = r7 & r6;
409 p5.h = _ex_table;
410 p5.l = _ex_table;
411 p4 = r7;
412 p5 = p5 + (p4 << 2);
413 p4 = [p5];
414 jump (p4);
415
416 .Lbadsys:
417 r7 = -ENOSYS; /* signextending enough */
418 [sp + PT_R0] = r7; /* return value from system call */
419 jump .Lsyscall_really_exit;
420 ENDPROC(_trap)
421
422 ENTRY(_kernel_execve)
423 link SIZEOF_PTREGS;
424 p0 = sp;
425 r3 = SIZEOF_PTREGS / 4;
426 r4 = 0(x);
427 0:
428 [p0++] = r4;
429 r3 += -1;
430 cc = r3 == 0;
431 if !cc jump 0b (bp);
432
433 p0 = sp;
434 sp += -16;
435 [sp + 12] = p0;
436 call _do_execve;
437 SP += 16;
438 cc = r0 == 0;
439 if ! cc jump 1f;
440 /* Success. Copy our temporary pt_regs to the top of the kernel
441 * stack and do a normal exception return.
442 */
443 r1 = sp;
444 r0 = (-KERNEL_STACK_SIZE) (x);
445 r1 = r1 & r0;
446 p2 = r1;
447 p3 = [p2];
448 r0 = KERNEL_STACK_SIZE - 4 (z);
449 p1 = r0;
450 p1 = p1 + p2;
451
452 p0 = fp;
453 r4 = [p0--];
454 r3 = SIZEOF_PTREGS / 4;
455 0:
456 r4 = [p0--];
457 [p1--] = r4;
458 r3 += -1;
459 cc = r3 == 0;
460 if ! cc jump 0b (bp);
461
462 r0 = (KERNEL_STACK_SIZE - SIZEOF_PTREGS) (z);
463 p1 = r0;
464 p1 = p1 + p2;
465 sp = p1;
466 r0 = syscfg;
467 [SP + PT_SYSCFG] = r0;
468 [p3 + (TASK_THREAD + THREAD_KSP)] = sp;
469
470 RESTORE_CONTEXT;
471 rti;
472 1:
473 unlink;
474 rts;
475 ENDPROC(_kernel_execve)
476
477 ENTRY(_system_call)
478 /* Store IPEND */
479 p2.l = lo(IPEND);
480 p2.h = hi(IPEND);
481 csync;
482 r0 = [p2];
483 [sp + PT_IPEND] = r0;
484
485 /* Store RETS for now */
486 r0 = rets;
487 [sp + PT_RESERVED] = r0;
488 /* Set the stack for the current process */
489 r7 = sp;
490 r6.l = lo(ALIGN_PAGE_MASK);
491 r6.h = hi(ALIGN_PAGE_MASK);
492 r7 = r7 & r6; /* thread_info */
493 p2 = r7;
494 p2 = [p2];
495
496 [p2+(TASK_THREAD+THREAD_KSP)] = sp;
497
498 /* Check the System Call */
499 r7 = __NR_syscall;
500 /* System call number is passed in P0 */
501 r6 = p0;
502 cc = r6 < r7;
503 if ! cc jump .Lbadsys;
504
505 /* are we tracing syscalls?*/
506 r7 = sp;
507 r6.l = lo(ALIGN_PAGE_MASK);
508 r6.h = hi(ALIGN_PAGE_MASK);
509 r7 = r7 & r6;
510 p2 = r7;
511 r7 = [p2+TI_FLAGS];
512 CC = BITTST(r7,TIF_SYSCALL_TRACE);
513 if CC JUMP _sys_trace;
514
515 /* Execute the appropriate system call */
516
517 p4 = p0;
518 p5.l = _sys_call_table;
519 p5.h = _sys_call_table;
520 p5 = p5 + (p4 << 2);
521 r0 = [sp + PT_R0];
522 r1 = [sp + PT_R1];
523 r2 = [sp + PT_R2];
524 p5 = [p5];
525
526 [--sp] = r5;
527 [--sp] = r4;
528 [--sp] = r3;
529 SP += -12;
530 call (p5);
531 SP += 24;
532 [sp + PT_R0] = r0;
533
534 .Lresume_userspace:
535 r7 = sp;
536 r4.l = lo(ALIGN_PAGE_MASK);
537 r4.h = hi(ALIGN_PAGE_MASK);
538 r7 = r7 & r4; /* thread_info->flags */
539 p5 = r7;
540 .Lresume_userspace_1:
541 /* Disable interrupts. */
542 [--sp] = reti;
543 reti = [sp++];
544
545 r7 = [p5 + TI_FLAGS];
546 r4.l = lo(_TIF_WORK_MASK);
547 r4.h = hi(_TIF_WORK_MASK);
548 r7 = r7 & r4;
549
550 .Lsyscall_resched:
551 cc = BITTST(r7, TIF_NEED_RESCHED);
552 if !cc jump .Lsyscall_sigpending;
553
554 /* Reenable interrupts. */
555 [--sp] = reti;
556 r0 = [sp++];
557
558 SP += -12;
559 call _schedule;
560 SP += 12;
561
562 jump .Lresume_userspace_1;
563
564 .Lsyscall_sigpending:
565 cc = BITTST(r7, TIF_RESTORE_SIGMASK);
566 if cc jump .Lsyscall_do_signals;
567 cc = BITTST(r7, TIF_SIGPENDING);
568 if !cc jump .Lsyscall_really_exit;
569 .Lsyscall_do_signals:
570 /* Reenable interrupts. */
571 [--sp] = reti;
572 r0 = [sp++];
573
574 r0 = sp;
575 SP += -12;
576 call _do_signal;
577 SP += 12;
578
579 .Lsyscall_really_exit:
580 r5 = [sp + PT_RESERVED];
581 rets = r5;
582 rts;
583 ENDPROC(_system_call)
584
585 _sys_trace:
586 call _syscall_trace;
587
588 /* Execute the appropriate system call */
589
590 p4 = [SP + PT_P0];
591 p5.l = _sys_call_table;
592 p5.h = _sys_call_table;
593 p5 = p5 + (p4 << 2);
594 r0 = [sp + PT_R0];
595 r1 = [sp + PT_R1];
596 r2 = [sp + PT_R2];
597 r3 = [sp + PT_R3];
598 r4 = [sp + PT_R4];
599 r5 = [sp + PT_R5];
600 p5 = [p5];
601
602 [--sp] = r5;
603 [--sp] = r4;
604 [--sp] = r3;
605 SP += -12;
606 call (p5);
607 SP += 24;
608 [sp + PT_R0] = r0;
609
610 call _syscall_trace;
611 jump .Lresume_userspace;
612 ENDPROC(_sys_trace)
613
614 ENTRY(_resume)
615 /*
616 * Beware - when entering resume, prev (the current task) is
617 * in r0, next (the new task) is in r1.
618 */
619 p0 = r0;
620 p1 = r1;
621 [--sp] = rets;
622 [--sp] = fp;
623 [--sp] = (r7:4, p5:3);
624
625 /* save usp */
626 p2 = usp;
627 [p0+(TASK_THREAD+THREAD_USP)] = p2;
628
629 /* save current kernel stack pointer */
630 [p0+(TASK_THREAD+THREAD_KSP)] = sp;
631
632 /* save program counter */
633 r1.l = _new_old_task;
634 r1.h = _new_old_task;
635 [p0+(TASK_THREAD+THREAD_PC)] = r1;
636
637 /* restore the kernel stack pointer */
638 sp = [p1+(TASK_THREAD+THREAD_KSP)];
639
640 /* restore user stack pointer */
641 p0 = [p1+(TASK_THREAD+THREAD_USP)];
642 usp = p0;
643
644 /* restore pc */
645 p0 = [p1+(TASK_THREAD+THREAD_PC)];
646 jump (p0);
647
648 /*
649 * Following code actually lands up in a new (old) task.
650 */
651
652 _new_old_task:
653 (r7:4, p5:3) = [sp++];
654 fp = [sp++];
655 rets = [sp++];
656
657 /*
658 * When we come out of resume, r0 carries "old" task, becuase we are
659 * in "new" task.
660 */
661 rts;
662 ENDPROC(_resume)
663
664 ENTRY(_ret_from_exception)
665 p2.l = lo(IPEND);
666 p2.h = hi(IPEND);
667
668 csync;
669 r0 = [p2];
670 [sp + PT_IPEND] = r0;
671
672 1:
673 r2 = LO(~0x37) (Z);
674 r0 = r2 & r0;
675 cc = r0 == 0;
676 if !cc jump 4f; /* if not return to user mode, get out */
677
678 /* Make sure any pending system call or deferred exception
679 * return in ILAT for this process to get executed, otherwise
680 * in case context switch happens, system call of
681 * first process (i.e in ILAT) will be carried
682 * forward to the switched process
683 */
684
685 p2.l = lo(ILAT);
686 p2.h = hi(ILAT);
687 r0 = [p2];
688 r1 = (EVT_IVG14 | EVT_IVG15) (z);
689 r0 = r0 & r1;
690 cc = r0 == 0;
691 if !cc jump 5f;
692
693 /* Set the stack for the current process */
694 r7 = sp;
695 r4.l = lo(ALIGN_PAGE_MASK);
696 r4.h = hi(ALIGN_PAGE_MASK);
697 r7 = r7 & r4; /* thread_info->flags */
698 p5 = r7;
699 r7 = [p5 + TI_FLAGS];
700 r4.l = lo(_TIF_WORK_MASK);
701 r4.h = hi(_TIF_WORK_MASK);
702 r7 = r7 & r4;
703 cc = r7 == 0;
704 if cc jump 4f;
705
706 p0.l = lo(EVT15);
707 p0.h = hi(EVT15);
708 p1.l = _schedule_and_signal;
709 p1.h = _schedule_and_signal;
710 [p0] = p1;
711 csync;
712 raise 15; /* raise evt14 to do signal or reschedule */
713 4:
714 r0 = syscfg;
715 bitclr(r0, 0);
716 syscfg = r0;
717 5:
718 rts;
719 ENDPROC(_ret_from_exception)
720
721 ENTRY(_return_from_int)
722 /* If someone else already raised IRQ 15, do nothing. */
723 csync;
724 p2.l = lo(ILAT);
725 p2.h = hi(ILAT);
726 r0 = [p2];
727 cc = bittst (r0, EVT_IVG15_P);
728 if cc jump 2f;
729
730 /* if not return to user mode, get out */
731 p2.l = lo(IPEND);
732 p2.h = hi(IPEND);
733 r0 = [p2];
734 r1 = 0x17(Z);
735 r2 = ~r1;
736 r2.h = 0;
737 r0 = r2 & r0;
738 r1 = 1;
739 r1 = r0 - r1;
740 r2 = r0 & r1;
741 cc = r2 == 0;
742 if !cc jump 2f;
743
744 /* Lower the interrupt level to 15. */
745 p0.l = lo(EVT15);
746 p0.h = hi(EVT15);
747 p1.l = _schedule_and_signal_from_int;
748 p1.h = _schedule_and_signal_from_int;
749 [p0] = p1;
750 csync;
751 #if ANOMALY_05000281
752 r0.l = lo(SAFE_USER_INSTRUCTION);
753 r0.h = hi(SAFE_USER_INSTRUCTION);
754 reti = r0;
755 #endif
756 r0 = 0x801f (z);
757 STI r0;
758 raise 15; /* raise evt15 to do signal or reschedule */
759 rti;
760 2:
761 rts;
762 ENDPROC(_return_from_int)
763
764 ENTRY(_lower_to_irq14)
765 #if ANOMALY_05000281
766 r0.l = lo(SAFE_USER_INSTRUCTION);
767 r0.h = hi(SAFE_USER_INSTRUCTION);
768 reti = r0;
769 #endif
770 r0 = 0x401f;
771 sti r0;
772 raise 14;
773 rti;
774 ENTRY(_evt14_softirq)
775 #ifdef CONFIG_DEBUG_HWERR
776 r0 = 0x3f;
777 sti r0;
778 #else
779 cli r0;
780 #endif
781 [--sp] = RETI;
782 SP += 4;
783 rts;
784
785 _schedule_and_signal_from_int:
786 /* To end up here, vector 15 was changed - so we have to change it
787 * back.
788 */
789 p0.l = lo(EVT15);
790 p0.h = hi(EVT15);
791 p1.l = _evt_system_call;
792 p1.h = _evt_system_call;
793 [p0] = p1;
794 csync;
795
796 /* Set orig_p0 to -1 to indicate this isn't the end of a syscall. */
797 r0 = -1 (x);
798 [sp + PT_ORIG_P0] = r0;
799
800 p1 = rets;
801 [sp + PT_RESERVED] = p1;
802
803 p0.l = _irq_flags;
804 p0.h = _irq_flags;
805 r0 = [p0];
806 sti r0;
807
808 r0 = sp;
809 sp += -12;
810 call _finish_atomic_sections;
811 sp += 12;
812 jump.s .Lresume_userspace;
813
814 _schedule_and_signal:
815 SAVE_CONTEXT_SYSCALL
816 /* To end up here, vector 15 was changed - so we have to change it
817 * back.
818 */
819 p0.l = lo(EVT15);
820 p0.h = hi(EVT15);
821 p1.l = _evt_system_call;
822 p1.h = _evt_system_call;
823 [p0] = p1;
824 csync;
825 p0.l = 1f;
826 p0.h = 1f;
827 [sp + PT_RESERVED] = P0;
828 call .Lresume_userspace;
829 1:
830 RESTORE_CONTEXT
831 rti;
832 ENDPROC(_lower_to_irq14)
833
834 /* We handle this 100% in exception space - to reduce overhead
835 * Only potiential problem is if the software buffer gets swapped out of the
836 * CPLB table - then double fault. - so we don't let this happen in other places
837 */
838 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
839 ENTRY(_ex_trace_buff_full)
840 [--sp] = P3;
841 [--sp] = P2;
842 [--sp] = LC0;
843 [--sp] = LT0;
844 [--sp] = LB0;
845 P5.L = _trace_buff_offset;
846 P5.H = _trace_buff_offset;
847 P3 = [P5]; /* trace_buff_offset */
848 P5.L = lo(TBUFSTAT);
849 P5.H = hi(TBUFSTAT);
850 R7 = [P5];
851 R7 <<= 1; /* double, since we need to read twice */
852 LC0 = R7;
853 R7 <<= 2; /* need to shift over again,
854 * to get the number of bytes */
855 P5.L = lo(TBUF);
856 P5.H = hi(TBUF);
857 R6 = ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*1024) - 1;
858
859 P2 = R7;
860 P3 = P3 + P2;
861 R7 = P3;
862 R7 = R7 & R6;
863 P3 = R7;
864 P2.L = _trace_buff_offset;
865 P2.H = _trace_buff_offset;
866 [P2] = P3;
867
868 P2.L = _software_trace_buff;
869 P2.H = _software_trace_buff;
870
871 LSETUP (.Lstart, .Lend) LC0;
872 .Lstart:
873 R7 = [P5]; /* read TBUF */
874 P4 = P3 + P2;
875 [P4] = R7;
876 P3 += -4;
877 R7 = P3;
878 R7 = R7 & R6;
879 .Lend:
880 P3 = R7;
881
882 LB0 = [sp++];
883 LT0 = [sp++];
884 LC0 = [sp++];
885 P2 = [sp++];
886 P3 = [sp++];
887 jump _bfin_return_from_exception;
888 ENDPROC(_ex_trace_buff_full)
889
890 #if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4
891 .data
892 #else
893 .section .l1.data.B
894 #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN */
895 ENTRY(_trace_buff_offset)
896 .long 0;
897 ALIGN
898 ENTRY(_software_trace_buff)
899 .rept ((1 << CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN)*256);
900 .long 0
901 .endr
902 #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */
903
904 #if CONFIG_EARLY_PRINTK
905 __INIT
906 ENTRY(_early_trap)
907 SAVE_ALL_SYS
908 trace_buffer_stop(p0,r0);
909
910 /* Turn caches off, to ensure we don't get double exceptions */
911
912 P4.L = LO(IMEM_CONTROL);
913 P4.H = HI(IMEM_CONTROL);
914
915 R5 = [P4]; /* Control Register*/
916 BITCLR(R5,ENICPLB_P);
917 CLI R1;
918 SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */
919 .align 8;
920 [P4] = R5;
921 SSYNC;
922
923 P4.L = LO(DMEM_CONTROL);
924 P4.H = HI(DMEM_CONTROL);
925 R5 = [P4];
926 BITCLR(R5,ENDCPLB_P);
927 SSYNC; /* SSYNC required before writing to DMEM_CONTROL. */
928 .align 8;
929 [P4] = R5;
930 SSYNC;
931 STI R1;
932
933 r0 = sp; /* stack frame pt_regs pointer argument ==> r0 */
934 r1 = RETX;
935
936 SP += -12;
937 call _early_trap_c;
938 SP += 12;
939 ENDPROC(_early_trap)
940 __FINIT
941 #endif /* CONFIG_EARLY_PRINTK */
942
943 /*
944 * Put these in the kernel data section - that should always be covered by
945 * a CPLB. This is needed to ensure we don't get double fault conditions
946 */
947
948 #ifdef CONFIG_SYSCALL_TAB_L1
949 .section .l1.data
950 #else
951 .data
952 #endif
953
954 ENTRY(_ex_table)
955 /* entry for each EXCAUSE[5:0]
956 * This table must be in sync with the table in ./kernel/traps.c
957 * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined
958 */
959 .long _ex_syscall /* 0x00 - User Defined - Linux Syscall */
960 .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */
961 .long _ex_replaceable /* 0x02 - User Defined */
962 .long _ex_trap_c /* 0x03 - User Defined - userspace stack overflow */
963 .long _ex_trap_c /* 0x04 - User Defined - dump trace buffer */
964 .long _ex_replaceable /* 0x05 - User Defined */
965 .long _ex_replaceable /* 0x06 - User Defined */
966 .long _ex_replaceable /* 0x07 - User Defined */
967 .long _ex_replaceable /* 0x08 - User Defined */
968 .long _ex_replaceable /* 0x09 - User Defined */
969 .long _ex_replaceable /* 0x0A - User Defined */
970 .long _ex_replaceable /* 0x0B - User Defined */
971 .long _ex_replaceable /* 0x0C - User Defined */
972 .long _ex_replaceable /* 0x0D - User Defined */
973 .long _ex_replaceable /* 0x0E - User Defined */
974 .long _ex_replaceable /* 0x0F - User Defined */
975 .long _ex_single_step /* 0x10 - HW Single step */
976 #ifdef CONFIG_DEBUG_BFIN_HWTRACE_EXPAND
977 .long _ex_trace_buff_full /* 0x11 - Trace Buffer Full */
978 #else
979 .long _ex_trap_c /* 0x11 - Trace Buffer Full */
980 #endif
981 .long _ex_trap_c /* 0x12 - Reserved */
982 .long _ex_trap_c /* 0x13 - Reserved */
983 .long _ex_trap_c /* 0x14 - Reserved */
984 .long _ex_trap_c /* 0x15 - Reserved */
985 .long _ex_trap_c /* 0x16 - Reserved */
986 .long _ex_trap_c /* 0x17 - Reserved */
987 .long _ex_trap_c /* 0x18 - Reserved */
988 .long _ex_trap_c /* 0x19 - Reserved */
989 .long _ex_trap_c /* 0x1A - Reserved */
990 .long _ex_trap_c /* 0x1B - Reserved */
991 .long _ex_trap_c /* 0x1C - Reserved */
992 .long _ex_trap_c /* 0x1D - Reserved */
993 .long _ex_trap_c /* 0x1E - Reserved */
994 .long _ex_trap_c /* 0x1F - Reserved */
995 .long _ex_trap_c /* 0x20 - Reserved */
996 .long _ex_trap_c /* 0x21 - Undefined Instruction */
997 .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */
998 .long _ex_dviol /* 0x23 - Data CPLB Protection Violation */
999 .long _ex_trap_c /* 0x24 - Data access misaligned */
1000 .long _ex_trap_c /* 0x25 - Unrecoverable Event */
1001 .long _ex_dmiss /* 0x26 - Data CPLB Miss */
1002 .long _ex_dmult /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */
1003 .long _ex_trap_c /* 0x28 - Emulation Watchpoint */
1004 .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */
1005 .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */
1006 .long _ex_trap_c /* 0x2B - Instruction CPLB protection Violation */
1007 .long _ex_icplb_miss /* 0x2C - Instruction CPLB miss */
1008 .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */
1009 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
1010 .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */
1011 .long _ex_trap_c /* 0x2F - Reserved */
1012 .long _ex_trap_c /* 0x30 - Reserved */
1013 .long _ex_trap_c /* 0x31 - Reserved */
1014 .long _ex_trap_c /* 0x32 - Reserved */
1015 .long _ex_trap_c /* 0x33 - Reserved */
1016 .long _ex_trap_c /* 0x34 - Reserved */
1017 .long _ex_trap_c /* 0x35 - Reserved */
1018 .long _ex_trap_c /* 0x36 - Reserved */
1019 .long _ex_trap_c /* 0x37 - Reserved */
1020 .long _ex_trap_c /* 0x38 - Reserved */
1021 .long _ex_trap_c /* 0x39 - Reserved */
1022 .long _ex_trap_c /* 0x3A - Reserved */
1023 .long _ex_trap_c /* 0x3B - Reserved */
1024 .long _ex_trap_c /* 0x3C - Reserved */
1025 .long _ex_trap_c /* 0x3D - Reserved */
1026 .long _ex_trap_c /* 0x3E - Reserved */
1027 .long _ex_trap_c /* 0x3F - Reserved */
1028 END(_ex_table)
1029
1030 ENTRY(_sys_call_table)
1031 .long _sys_restart_syscall /* 0 */
1032 .long _sys_exit
1033 .long _sys_fork
1034 .long _sys_read
1035 .long _sys_write
1036 .long _sys_open /* 5 */
1037 .long _sys_close
1038 .long _sys_ni_syscall /* old waitpid */
1039 .long _sys_creat
1040 .long _sys_link
1041 .long _sys_unlink /* 10 */
1042 .long _sys_execve
1043 .long _sys_chdir
1044 .long _sys_time
1045 .long _sys_mknod
1046 .long _sys_chmod /* 15 */
1047 .long _sys_chown /* chown16 */
1048 .long _sys_ni_syscall /* old break syscall holder */
1049 .long _sys_ni_syscall /* old stat */
1050 .long _sys_lseek
1051 .long _sys_getpid /* 20 */
1052 .long _sys_mount
1053 .long _sys_ni_syscall /* old umount */
1054 .long _sys_setuid
1055 .long _sys_getuid
1056 .long _sys_stime /* 25 */
1057 .long _sys_ptrace
1058 .long _sys_alarm
1059 .long _sys_ni_syscall /* old fstat */
1060 .long _sys_pause
1061 .long _sys_ni_syscall /* old utime */ /* 30 */
1062 .long _sys_ni_syscall /* old stty syscall holder */
1063 .long _sys_ni_syscall /* old gtty syscall holder */
1064 .long _sys_access
1065 .long _sys_nice
1066 .long _sys_ni_syscall /* 35 */ /* old ftime syscall holder */
1067 .long _sys_sync
1068 .long _sys_kill
1069 .long _sys_rename
1070 .long _sys_mkdir
1071 .long _sys_rmdir /* 40 */
1072 .long _sys_dup
1073 .long _sys_pipe
1074 .long _sys_times
1075 .long _sys_ni_syscall /* old prof syscall holder */
1076 .long _sys_brk /* 45 */
1077 .long _sys_setgid
1078 .long _sys_getgid
1079 .long _sys_ni_syscall /* old sys_signal */
1080 .long _sys_geteuid /* geteuid16 */
1081 .long _sys_getegid /* getegid16 */ /* 50 */
1082 .long _sys_acct
1083 .long _sys_umount /* recycled never used phys() */
1084 .long _sys_ni_syscall /* old lock syscall holder */
1085 .long _sys_ioctl
1086 .long _sys_fcntl /* 55 */
1087 .long _sys_ni_syscall /* old mpx syscall holder */
1088 .long _sys_setpgid
1089 .long _sys_ni_syscall /* old ulimit syscall holder */
1090 .long _sys_ni_syscall /* old old uname */
1091 .long _sys_umask /* 60 */
1092 .long _sys_chroot
1093 .long _sys_ustat
1094 .long _sys_dup2
1095 .long _sys_getppid
1096 .long _sys_getpgrp /* 65 */
1097 .long _sys_setsid
1098 .long _sys_ni_syscall /* old sys_sigaction */
1099 .long _sys_sgetmask
1100 .long _sys_ssetmask
1101 .long _sys_setreuid /* setreuid16 */ /* 70 */
1102 .long _sys_setregid /* setregid16 */
1103 .long _sys_ni_syscall /* old sys_sigsuspend */
1104 .long _sys_ni_syscall /* old sys_sigpending */
1105 .long _sys_sethostname
1106 .long _sys_setrlimit /* 75 */
1107 .long _sys_ni_syscall /* old getrlimit */
1108 .long _sys_getrusage
1109 .long _sys_gettimeofday
1110 .long _sys_settimeofday
1111 .long _sys_getgroups /* getgroups16 */ /* 80 */
1112 .long _sys_setgroups /* setgroups16 */
1113 .long _sys_ni_syscall /* old_select */
1114 .long _sys_symlink
1115 .long _sys_ni_syscall /* old lstat */
1116 .long _sys_readlink /* 85 */
1117 .long _sys_uselib
1118 .long _sys_ni_syscall /* sys_swapon */
1119 .long _sys_reboot
1120 .long _sys_ni_syscall /* old_readdir */
1121 .long _sys_ni_syscall /* sys_mmap */ /* 90 */
1122 .long _sys_munmap
1123 .long _sys_truncate
1124 .long _sys_ftruncate
1125 .long _sys_fchmod
1126 .long _sys_fchown /* fchown16 */ /* 95 */
1127 .long _sys_getpriority
1128 .long _sys_setpriority
1129 .long _sys_ni_syscall /* old profil syscall holder */
1130 .long _sys_statfs
1131 .long _sys_fstatfs /* 100 */
1132 .long _sys_ni_syscall
1133 .long _sys_ni_syscall /* old sys_socketcall */
1134 .long _sys_syslog
1135 .long _sys_setitimer
1136 .long _sys_getitimer /* 105 */
1137 .long _sys_newstat
1138 .long _sys_newlstat
1139 .long _sys_newfstat
1140 .long _sys_ni_syscall /* old uname */
1141 .long _sys_ni_syscall /* iopl for i386 */ /* 110 */
1142 .long _sys_vhangup
1143 .long _sys_ni_syscall /* obsolete idle() syscall */
1144 .long _sys_ni_syscall /* vm86old for i386 */
1145 .long _sys_wait4
1146 .long _sys_ni_syscall /* 115 */ /* sys_swapoff */
1147 .long _sys_sysinfo
1148 .long _sys_ni_syscall /* old sys_ipc */
1149 .long _sys_fsync
1150 .long _sys_ni_syscall /* old sys_sigreturn */
1151 .long _sys_clone /* 120 */
1152 .long _sys_setdomainname
1153 .long _sys_newuname
1154 .long _sys_ni_syscall /* old sys_modify_ldt */
1155 .long _sys_adjtimex
1156 .long _sys_ni_syscall /* 125 */ /* sys_mprotect */
1157 .long _sys_ni_syscall /* old sys_sigprocmask */
1158 .long _sys_ni_syscall /* old "creat_module" */
1159 .long _sys_init_module
1160 .long _sys_delete_module
1161 .long _sys_ni_syscall /* 130: old "get_kernel_syms" */
1162 .long _sys_quotactl
1163 .long _sys_getpgid
1164 .long _sys_fchdir
1165 .long _sys_bdflush
1166 .long _sys_ni_syscall /* 135 */ /* sys_sysfs */
1167 .long _sys_personality
1168 .long _sys_ni_syscall /* for afs_syscall */
1169 .long _sys_setfsuid /* setfsuid16 */
1170 .long _sys_setfsgid /* setfsgid16 */
1171 .long _sys_llseek /* 140 */
1172 .long _sys_getdents
1173 .long _sys_ni_syscall /* sys_select */
1174 .long _sys_flock
1175 .long _sys_ni_syscall /* sys_msync */
1176 .long _sys_readv /* 145 */
1177 .long _sys_writev
1178 .long _sys_getsid
1179 .long _sys_fdatasync
1180 .long _sys_sysctl
1181 .long _sys_ni_syscall /* 150 */ /* sys_mlock */
1182 .long _sys_ni_syscall /* sys_munlock */
1183 .long _sys_ni_syscall /* sys_mlockall */
1184 .long _sys_ni_syscall /* sys_munlockall */
1185 .long _sys_sched_setparam
1186 .long _sys_sched_getparam /* 155 */
1187 .long _sys_sched_setscheduler
1188 .long _sys_sched_getscheduler
1189 .long _sys_sched_yield
1190 .long _sys_sched_get_priority_max
1191 .long _sys_sched_get_priority_min /* 160 */
1192 .long _sys_sched_rr_get_interval
1193 .long _sys_nanosleep
1194 .long _sys_mremap
1195 .long _sys_setresuid /* setresuid16 */
1196 .long _sys_getresuid /* getresuid16 */ /* 165 */
1197 .long _sys_ni_syscall /* for vm86 */
1198 .long _sys_ni_syscall /* old "query_module" */
1199 .long _sys_ni_syscall /* sys_poll */
1200 .long _sys_nfsservctl
1201 .long _sys_setresgid /* setresgid16 */ /* 170 */
1202 .long _sys_getresgid /* getresgid16 */
1203 .long _sys_prctl
1204 .long _sys_rt_sigreturn
1205 .long _sys_rt_sigaction
1206 .long _sys_rt_sigprocmask /* 175 */
1207 .long _sys_rt_sigpending
1208 .long _sys_rt_sigtimedwait
1209 .long _sys_rt_sigqueueinfo
1210 .long _sys_rt_sigsuspend
1211 .long _sys_pread64 /* 180 */
1212 .long _sys_pwrite64
1213 .long _sys_lchown /* lchown16 */
1214 .long _sys_getcwd
1215 .long _sys_capget
1216 .long _sys_capset /* 185 */
1217 .long _sys_sigaltstack
1218 .long _sys_sendfile
1219 .long _sys_ni_syscall /* streams1 */
1220 .long _sys_ni_syscall /* streams2 */
1221 .long _sys_vfork /* 190 */
1222 .long _sys_getrlimit
1223 .long _sys_mmap2
1224 .long _sys_truncate64
1225 .long _sys_ftruncate64
1226 .long _sys_stat64 /* 195 */
1227 .long _sys_lstat64
1228 .long _sys_fstat64
1229 .long _sys_chown
1230 .long _sys_getuid
1231 .long _sys_getgid /* 200 */
1232 .long _sys_geteuid
1233 .long _sys_getegid
1234 .long _sys_setreuid
1235 .long _sys_setregid
1236 .long _sys_getgroups /* 205 */
1237 .long _sys_setgroups
1238 .long _sys_fchown
1239 .long _sys_setresuid
1240 .long _sys_getresuid
1241 .long _sys_setresgid /* 210 */
1242 .long _sys_getresgid
1243 .long _sys_lchown
1244 .long _sys_setuid
1245 .long _sys_setgid
1246 .long _sys_setfsuid /* 215 */
1247 .long _sys_setfsgid
1248 .long _sys_pivot_root
1249 .long _sys_ni_syscall /* sys_mincore */
1250 .long _sys_ni_syscall /* sys_madvise */
1251 .long _sys_getdents64 /* 220 */
1252 .long _sys_fcntl64
1253 .long _sys_ni_syscall /* reserved for TUX */
1254 .long _sys_ni_syscall
1255 .long _sys_gettid
1256 .long _sys_readahead /* 225 */
1257 .long _sys_setxattr
1258 .long _sys_lsetxattr
1259 .long _sys_fsetxattr
1260 .long _sys_getxattr
1261 .long _sys_lgetxattr /* 230 */
1262 .long _sys_fgetxattr
1263 .long _sys_listxattr
1264 .long _sys_llistxattr
1265 .long _sys_flistxattr
1266 .long _sys_removexattr /* 235 */
1267 .long _sys_lremovexattr
1268 .long _sys_fremovexattr
1269 .long _sys_tkill
1270 .long _sys_sendfile64
1271 .long _sys_futex /* 240 */
1272 .long _sys_sched_setaffinity
1273 .long _sys_sched_getaffinity
1274 .long _sys_ni_syscall /* sys_set_thread_area */
1275 .long _sys_ni_syscall /* sys_get_thread_area */
1276 .long _sys_io_setup /* 245 */
1277 .long _sys_io_destroy
1278 .long _sys_io_getevents
1279 .long _sys_io_submit
1280 .long _sys_io_cancel
1281 .long _sys_ni_syscall /* 250 */ /* sys_alloc_hugepages */
1282 .long _sys_ni_syscall /* sys_freec_hugepages */
1283 .long _sys_exit_group
1284 .long _sys_lookup_dcookie
1285 .long _sys_bfin_spinlock
1286 .long _sys_epoll_create /* 255 */
1287 .long _sys_epoll_ctl
1288 .long _sys_epoll_wait
1289 .long _sys_ni_syscall /* remap_file_pages */
1290 .long _sys_set_tid_address
1291 .long _sys_timer_create /* 260 */
1292 .long _sys_timer_settime
1293 .long _sys_timer_gettime
1294 .long _sys_timer_getoverrun
1295 .long _sys_timer_delete
1296 .long _sys_clock_settime /* 265 */
1297 .long _sys_clock_gettime
1298 .long _sys_clock_getres
1299 .long _sys_clock_nanosleep
1300 .long _sys_statfs64
1301 .long _sys_fstatfs64 /* 270 */
1302 .long _sys_tgkill
1303 .long _sys_utimes
1304 .long _sys_fadvise64_64
1305 .long _sys_ni_syscall /* vserver */
1306 .long _sys_ni_syscall /* 275, mbind */
1307 .long _sys_ni_syscall /* get_mempolicy */
1308 .long _sys_ni_syscall /* set_mempolicy */
1309 .long _sys_mq_open
1310 .long _sys_mq_unlink
1311 .long _sys_mq_timedsend /* 280 */
1312 .long _sys_mq_timedreceive
1313 .long _sys_mq_notify
1314 .long _sys_mq_getsetattr
1315 .long _sys_ni_syscall /* kexec_load */
1316 .long _sys_waitid /* 285 */
1317 .long _sys_add_key
1318 .long _sys_request_key
1319 .long _sys_keyctl
1320 .long _sys_ioprio_set
1321 .long _sys_ioprio_get /* 290 */
1322 .long _sys_inotify_init
1323 .long _sys_inotify_add_watch
1324 .long _sys_inotify_rm_watch
1325 .long _sys_ni_syscall /* migrate_pages */
1326 .long _sys_openat /* 295 */
1327 .long _sys_mkdirat
1328 .long _sys_mknodat
1329 .long _sys_fchownat
1330 .long _sys_futimesat
1331 .long _sys_fstatat64 /* 300 */
1332 .long _sys_unlinkat
1333 .long _sys_renameat
1334 .long _sys_linkat
1335 .long _sys_symlinkat
1336 .long _sys_readlinkat /* 305 */
1337 .long _sys_fchmodat
1338 .long _sys_faccessat
1339 .long _sys_pselect6
1340 .long _sys_ppoll
1341 .long _sys_unshare /* 310 */
1342 .long _sys_sram_alloc
1343 .long _sys_sram_free
1344 .long _sys_dma_memcpy
1345 .long _sys_accept
1346 .long _sys_bind /* 315 */
1347 .long _sys_connect
1348 .long _sys_getpeername
1349 .long _sys_getsockname
1350 .long _sys_getsockopt
1351 .long _sys_listen /* 320 */
1352 .long _sys_recv
1353 .long _sys_recvfrom
1354 .long _sys_recvmsg
1355 .long _sys_send
1356 .long _sys_sendmsg /* 325 */
1357 .long _sys_sendto
1358 .long _sys_setsockopt
1359 .long _sys_shutdown
1360 .long _sys_socket
1361 .long _sys_socketpair /* 330 */
1362 .long _sys_semctl
1363 .long _sys_semget
1364 .long _sys_semop
1365 .long _sys_msgctl
1366 .long _sys_msgget /* 335 */
1367 .long _sys_msgrcv
1368 .long _sys_msgsnd
1369 .long _sys_shmat
1370 .long _sys_shmctl
1371 .long _sys_shmdt /* 340 */
1372 .long _sys_shmget
1373 .long _sys_splice
1374 .long _sys_sync_file_range
1375 .long _sys_tee
1376 .long _sys_vmsplice /* 345 */
1377 .long _sys_epoll_pwait
1378 .long _sys_utimensat
1379 .long _sys_signalfd
1380 .long _sys_timerfd_create
1381 .long _sys_eventfd /* 350 */
1382 .long _sys_pread64
1383 .long _sys_pwrite64
1384 .long _sys_fadvise64
1385 .long _sys_set_robust_list
1386 .long _sys_get_robust_list /* 355 */
1387 .long _sys_fallocate
1388 .long _sys_semtimedop
1389 .long _sys_timerfd_settime
1390 .long _sys_timerfd_gettime
1391
1392 .rept NR_syscalls-(.-_sys_call_table)/4
1393 .long _sys_ni_syscall
1394 .endr
1395
1396 /*
1397 * Used to save the real RETX, IMASK and SYSCFG when temporarily
1398 * storing safe values across the transition from exception to IRQ5.
1399 */
1400 _excpt_saved_stuff:
1401 .long 0;
1402 .long 0;
1403 .long 0;
1404
1405 _exception_stack:
1406 .rept 1024
1407 .long 0;
1408 .endr
1409 _exception_stack_top:
1410
1411 #if ANOMALY_05000261
1412 /* Used by the assembly entry point to work around an anomaly. */
1413 _last_cplb_fault_retx:
1414 .long 0;
1415 #endif
This page took 0.10078 seconds and 5 git commands to generate.