summaryrefslogtreecommitdiff
path: root/arch/arc/kernel/entry.S
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2014-10-13 18:13:35 +0530
committerVineet Gupta <vgupta@synopsys.com>2015-06-19 18:09:34 +0530
commit09f3b37e4e3bbe22444617c273a3c046aade5db2 (patch)
treeb3f4bb8e144576aa0de20e2810a0fdbc857c1b1b /arch/arc/kernel/entry.S
parentfbfa26ae3b2001d0885938175f9af5a4c50a528c (diff)
ARC: entry.S: Introduce INTERRUPT_{PROLOGUE,EPILOGUE}
-common'ize macros for level 1 and level 2 interrupts Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/entry.S')
-rw-r--r--arch/arc/kernel/entry.S22
1 files changed, 4 insertions, 18 deletions
diff --git a/arch/arc/kernel/entry.S b/arch/arc/kernel/entry.S
index 13b14b8dcd8d..03a349520b55 100644
--- a/arch/arc/kernel/entry.S
+++ b/arch/arc/kernel/entry.S
@@ -186,14 +186,7 @@ reserved: ; processor restart
; ---------------------------------------------
ENTRY(handle_interrupt_level2)
- ; free up r9 as scratchpad
- PROLOG_FREEUP_REG r9, @int2_saved_reg
-
- ;Which mode (user/kernel) was the system in when intr occured
- lr r9, [status32_l2]
-
- SWITCH_TO_KERNEL_STK
- SAVE_ALL_INT2
+ INTERRUPT_PROLOGUE 2
;------------------------------------------------------
; if L2 IRQ interrupted a L1 ISR, disable preemption
@@ -233,13 +226,7 @@ END(handle_interrupt_level2)
; ---------------------------------------------
ENTRY(handle_interrupt_level1)
- PROLOG_FREEUP_REG r9, @int1_saved_reg
-
- ;Which mode (user/kernel) was the system in when intr occured
- lr r9, [status32_l1]
-
- SWITCH_TO_KERNEL_STK
- SAVE_ALL_INT1
+ INTERRUPT_PROLOGUE 1
lr r0, [icause1]
and r0, r0, 0x1f
@@ -698,7 +685,7 @@ not_exception:
149:
;return from level 2
- RESTORE_ALL_INT2
+ INTERRUPT_EPILOGUE 2
debug_marker_l2:
rtie
@@ -709,8 +696,7 @@ not_level2_interrupt:
bbit0 r10, STATUS_A1_BIT, not_level1_interrupt
;return from level 1
-
- RESTORE_ALL_INT1
+ INTERRUPT_EPILOGUE 1
debug_marker_l1:
rtie