浏览代码

ARC: entry.S: canonical'ize EXCEPTION_{PROLOGUE,EPILOGUE}

-EXCEPTION_EPILOGUE introduced
-EXCEPTION_PROLOGUE now also includes reg file saving

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Vineet Gupta 10 年之前
父节点
当前提交
f033737e77
共有 2 个文件被更改,包括 3 次插入18 次删除
  1. 1 16
      arch/arc/include/asm/entry.h
  2. 2 2
      arch/arc/kernel/entry.S

+ 1 - 16
arch/arc/include/asm/entry.h

@@ -401,21 +401,6 @@
 	/* ARC700 doesn't provide auto-stack switching */
 	/* ARC700 doesn't provide auto-stack switching */
 	SWITCH_TO_KERNEL_STK
 	SWITCH_TO_KERNEL_STK
 
 
-	/* save the regfile */
-	SAVE_ALL_SYS
-.endm
-
-/*--------------------------------------------------------------
- * Save all registers used by Exceptions (TLB Miss, Prot-V, Mem err etc)
- * Requires SP to be already switched to kernel mode Stack
- * sp points to the next free element on the stack at exit of this macro.
- * Registers are pushed / popped in the order defined in struct ptregs
- * in asm/ptrace.h
- * Note that syscalls are implemented via TRAP which is also a exception
- * from CPU's point of view
- *-------------------------------------------------------------*/
-.macro SAVE_ALL_SYS
-
 	lr	r9, [ecr]
 	lr	r9, [ecr]
 	st      r9, [sp, 8]    /* ECR */
 	st      r9, [sp, 8]    /* ECR */
 	st      r0, [sp, 4]    /* orig_r0, needed only for sys calls */
 	st      r0, [sp, 4]    /* orig_r0, needed only for sys calls */
@@ -446,7 +431,7 @@
  * for memory load operations. If used in that way interrupts are deffered
  * for memory load operations. If used in that way interrupts are deffered
  * by hardware and that is not good.
  * by hardware and that is not good.
  *-------------------------------------------------------------*/
  *-------------------------------------------------------------*/
-.macro RESTORE_ALL_SYS
+.macro EXCEPTION_EPILOGUE
 	POPAX	erbta
 	POPAX	erbta
 	POPAX	lp_start
 	POPAX	lp_start
 	POPAX	lp_end
 	POPAX	lp_end

+ 2 - 2
arch/arc/kernel/entry.S

@@ -638,7 +638,7 @@ restore_regs :
 
 
 	; if Returning from Exception
 	; if Returning from Exception
 	bbit0  r10, STATUS_AE_BIT, not_exception
 	bbit0  r10, STATUS_AE_BIT, not_exception
-	RESTORE_ALL_SYS
+	EXCEPTION_EPILOGUE
 	rtie
 	rtie
 
 
 	; Not Exception so maybe Interrupts (Level 1 or 2)
 	; Not Exception so maybe Interrupts (Level 1 or 2)
@@ -704,7 +704,7 @@ not_level1_interrupt:
 
 
 	;this case is for syscalls or Exceptions (with fake rtie)
 	;this case is for syscalls or Exceptions (with fake rtie)
 
 
-	RESTORE_ALL_SYS
+	EXCEPTION_EPILOGUE
 debug_marker_syscall:
 debug_marker_syscall:
 	rtie
 	rtie