Skip to content

Commit

Permalink
ARC: entry.S: use single EXCEPTION_PROLOGUE
Browse files Browse the repository at this point in the history
Returning from pure kernel mode and exception mode use the same code
anyways. Remove one the duplicate blocks

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Jun 19, 2015
1 parent 62fb640 commit c80417b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions arch/arc/kernel/entry-compact.S
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,11 @@ END(call_do_page_fault)
; decide that.

; if Returning from Exception
bbit0 r10, STATUS_AE_BIT, not_exception
EXCEPTION_EPILOGUE
rtie
btst r10, STATUS_AE_BIT
bnz .Lexcep_ret

; Not Exception so maybe Interrupts (Level 1 or 2)

not_exception:

#ifdef CONFIG_ARC_COMPACT_IRQ_LEVELS

; Level 2 interrupt return Path - from hardware standpoint
Expand Down Expand Up @@ -377,16 +374,17 @@ not_level2_interrupt:

#endif

bbit0 r10, STATUS_A1_BIT, not_level1_interrupt
bbit0 r10, STATUS_A1_BIT, .Lpure_k_mode_ret

;return from level 1
INTERRUPT_EPILOGUE 1
debug_marker_l1:
rtie

not_level1_interrupt:
.Lexcep_ret:
.Lpure_k_mode_ret:

;this case is for syscalls or Exceptions (with fake rtie)
;this case is for syscalls or Exceptions or pure kernel mode

EXCEPTION_EPILOGUE
debug_marker_syscall:
Expand Down

0 comments on commit c80417b

Please sign in to comment.