entry.S 31 KB

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