aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2015-02-27 06:15:08 -0500
committerVineet Gupta <vgupta@synopsys.com>2015-06-19 08:39:37 -0400
commit4bf4564b27db18c77c82840025fbfdb0e62406cf (patch)
tree10467d13ed06131826570c8eb0266d63af662ba0
parenta8717d280879213eab8383e4a912d99514970e17 (diff)
ARC: entry.S: comments cleanup
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r--arch/arc/kernel/entry.S46
1 files changed, 20 insertions, 26 deletions
diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S
index b120f3e1e13e..bd6dc892c7a8 100644
--- a/arch/arc/kernel/entry.S
+++ b/arch/arc/kernel/entry.S
@@ -322,13 +322,8 @@ ENTRY(EV_TLBProtV)
322 322
323 EXCEPTION_PROLOGUE 323 EXCEPTION_PROLOGUE
324 324
325 ;---------(3) Save some more regs-----------------
326 ; vineetg: Mar 6th: Random Seg Fault issue #1
327 ; ecr and efa were not saved in case an Intr sneaks in
328 ; after fake rtie
329
330 lr r2, [ecr] 325 lr r2, [ecr]
331 lr r0, [efa] ; Faulting Data address 326 lr r0, [efa] ; Faulting Data addr (not part of pt_regs saved above)
332 327
333 ; Exception auto-disables further Intr/exceptions. 328 ; Exception auto-disables further Intr/exceptions.
334 ; Re-enable them by pretending to return from exception 329 ; Re-enable them by pretending to return from exception
@@ -336,7 +331,7 @@ ENTRY(EV_TLBProtV)
336 331
337 FAKE_RET_FROM_EXCPN 332 FAKE_RET_FROM_EXCPN
338 333
339 mov r1, sp 334 mov r1, sp ; Handle to pt_regs
340 335
341 ;------ (5) Type of Protection Violation? ---------- 336 ;------ (5) Type of Protection Violation? ----------
342 ; 337 ;
@@ -415,8 +410,11 @@ ENTRY(EV_Extension)
415 b ret_from_exception 410 b ret_from_exception
416END(EV_Extension) 411END(EV_Extension)
417 412
418;######################### System Call Tracing ######################### 413;################ Trap Handling (Syscall, Breakpoint) ##################
419 414
415; ---------------------------------------------
416; syscall Tracing
417; ---------------------------------------------
420tracesys: 418tracesys:
421 ; save EFA in case tracer wants the PC of traced task 419 ; save EFA in case tracer wants the PC of traced task
422 ; using ERET won't work since next-PC has already committed 420 ; using ERET won't work since next-PC has already committed
@@ -459,10 +457,9 @@ tracesys_exit:
459 b ret_from_exception ; NOT ret_from_system_call at is saves r0 which 457 b ret_from_exception ; NOT ret_from_system_call at is saves r0 which
460 ; we'd done before calling post hook above 458 ; we'd done before calling post hook above
461 459
462;################### Break Point TRAP ########################## 460; ---------------------------------------------
463 461; Breakpoint TRAP
464 ; ======= (5b) Trap is due to Break-Point ========= 462; ---------------------------------------------
465
466trap_with_param: 463trap_with_param:
467 464
468 ; stop_pc info by gdb needs this info 465 ; stop_pc info by gdb needs this info
@@ -490,36 +487,33 @@ trap_with_param:
490 487
491 b ret_from_exception 488 b ret_from_exception
492 489
493;##################### Trap Handling ############################## 490; ---------------------------------------------
494; 491; syscall TRAP
495; EV_Trap caused by TRAP_S and TRAP0 instructions. 492; ABI: (r0-r7) upto 8 args, (r8) syscall number
496;------------------------------------------------------------------ 493; ---------------------------------------------
497; (1) System Calls
498; :parameters in r0-r7.
499; :r8 has the system call number
500; (2) Break Points
501;------------------------------------------------------------------
502 494
503ENTRY(EV_Trap) 495ENTRY(EV_Trap)
504 496
505 EXCEPTION_PROLOGUE 497 EXCEPTION_PROLOGUE
506 498
507 ;------- (4) What caused the Trap -------------- 499 ;============ TRAP 1 :breakpoints
508 lr r10, [ecr] 500 lr r10, [ecr]
509 bmsk.f 0, r10, 7 501 bmsk.f 0, r10, 7
510 bnz trap_with_param 502 bnz trap_with_param
511 503
512 ; ======= (5a) Trap is due to System Call ======== 504 ;============ TRAP (no param): syscall top level
513 505
506 ; First return from Exception to pure K mode (Exception/IRQs renabled)
514 FAKE_RET_FROM_EXCPN 507 FAKE_RET_FROM_EXCPN
515 508
516 ; If syscall tracing ongoing, invoke pre-pos-hooks 509 ; If syscall tracing ongoing, invoke pre-post-hooks
517 GET_CURR_THR_INFO_FLAGS r10 510 GET_CURR_THR_INFO_FLAGS r10
518 btst r10, TIF_SYSCALL_TRACE 511 btst r10, TIF_SYSCALL_TRACE
519 bnz tracesys ; this never comes back 512 bnz tracesys ; this never comes back
520 513
521 ;============ This is normal System Call case ========== 514 ;============ Normal syscall case
522 ; Sys-call num shd not exceed the total system calls avail 515
516 ; syscall num shd not exceed the total system calls avail
523 cmp r8, NR_syscalls 517 cmp r8, NR_syscalls
524 mov.hi r0, -ENOSYS 518 mov.hi r0, -ENOSYS
525 bhi ret_from_system_call 519 bhi ret_from_system_call