diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2015-03-13 06:20:23 (GMT) |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-06-19 12:39:39 (GMT) |
commit | 62fb64034d30293448de10a48c7ee47ee978e338 (patch) | |
tree | 29cad87e376821c563b2d93e7e8fb634f41af705 /arch/arc/include/asm | |
parent | c7e6d7920409c11f158ac5d38bdd08062bf16978 (diff) | |
download | linux-62fb64034d30293448de10a48c7ee47ee978e338.tar.xz |
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>
Diffstat (limited to 'arch/arc/include/asm')
-rw-r--r-- | arch/arc/include/asm/entry-compact.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arc/include/asm/entry-compact.h b/arch/arc/include/asm/entry-compact.h index 6c0a81b..8b65eb3 100644 --- a/arch/arc/include/asm/entry-compact.h +++ b/arch/arc/include/asm/entry-compact.h @@ -181,8 +181,6 @@ /* ARC700 doesn't provide auto-stack switching */ SWITCH_TO_KERNEL_STK - lr r9, [ecr] - st r9, [sp, 8] /* ECR */ st r0, [sp, 4] /* orig_r0, needed only for sys calls */ /* Restore r9 used to code the early prologue */ @@ -198,6 +196,9 @@ PUSHAX lp_end PUSHAX lp_start PUSHAX erbta + + lr r9, [ecr] + st r9, [sp, PT_event] /* EV_Trap expects r9 to have ECR */ .endm /*-------------------------------------------------------------- |