entry.S 31 KB

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