mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
ARC: entry.S: micro-optimize Trap handler
Elide the need to re-read ECR in Trap handler by ensuring that EXCEPTION_PROLOGUE does that at the very end just before returning to Trap handler ARCv2 EXCEPTION_PROLOGUE already did that, so same for ARcompact and the common trap handler adjusted to use cached ECR Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
This commit is contained in:
parent
c7e6d79204
commit
62fb64034d
@ -181,8 +181,6 @@
|
|||||||
/* ARC700 doesn't provide auto-stack switching */
|
/* ARC700 doesn't provide auto-stack switching */
|
||||||
SWITCH_TO_KERNEL_STK
|
SWITCH_TO_KERNEL_STK
|
||||||
|
|
||||||
lr r9, [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 */
|
||||||
|
|
||||||
/* Restore r9 used to code the early prologue */
|
/* Restore r9 used to code the early prologue */
|
||||||
@ -198,6 +196,9 @@
|
|||||||
PUSHAX lp_end
|
PUSHAX lp_end
|
||||||
PUSHAX lp_start
|
PUSHAX lp_start
|
||||||
PUSHAX erbta
|
PUSHAX erbta
|
||||||
|
|
||||||
|
lr r9, [ecr]
|
||||||
|
st r9, [sp, PT_event] /* EV_Trap expects r9 to have ECR */
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
/*--------------------------------------------------------------
|
/*--------------------------------------------------------------
|
||||||
|
@ -258,8 +258,8 @@ ENTRY(EV_Trap)
|
|||||||
EXCEPTION_PROLOGUE
|
EXCEPTION_PROLOGUE
|
||||||
|
|
||||||
;============ TRAP 1 :breakpoints
|
;============ TRAP 1 :breakpoints
|
||||||
lr r10, [ecr]
|
; Check ECR for trap with arg (PROLOGUE ensures r9 has ECR)
|
||||||
bmsk.f 0, r10, 7
|
bmsk.f 0, r9, 7
|
||||||
bnz trap_with_param
|
bnz trap_with_param
|
||||||
|
|
||||||
;============ TRAP (no param): syscall top level
|
;============ TRAP (no param): syscall top level
|
||||||
|
Loading…
Reference in New Issue
Block a user