diff options
author | Vineet Gupta <vgupta@kernel.org> | 2020-05-19 16:01:52 -0700 |
---|---|---|
committer | Vineet Gupta <vgupta@kernel.org> | 2023-08-17 20:31:59 -0700 |
commit | c505b0da76a67139e073a5a5c4a1986b1cf168d3 (patch) | |
tree | ee8f499cf9ad4e2af1f50ff854ae5b95aa142180 /arch/arc/include | |
parent | fd476197c63dd3aae85e286dab7da23b159562b9 (diff) |
ARC: entry: rework (non-functional)
- comments update
- rename syscall_trace_entry
- use PT_xxx in entry code
Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Diffstat (limited to 'arch/arc/include')
-rw-r--r-- | arch/arc/include/asm/entry-arcv2.h | 23 | ||||
-rw-r--r-- | arch/arc/include/asm/entry-compact.h | 3 | ||||
-rw-r--r-- | arch/arc/include/asm/ptrace.h | 2 |
3 files changed, 17 insertions, 11 deletions
diff --git a/arch/arc/include/asm/entry-arcv2.h b/arch/arc/include/asm/entry-arcv2.h index 858742feab71..a38ed505b3de 100644 --- a/arch/arc/include/asm/entry-arcv2.h +++ b/arch/arc/include/asm/entry-arcv2.h @@ -48,14 +48,18 @@ /*------------------------------------------------------------------------*/ .macro INTERRUPT_PROLOGUE - ; (A) Before jumping to Interrupt Vector, hardware micro-ops did following: + ; Before jumping to Interrupt Vector, hardware micro-ops did following: ; 1. SP auto-switched to kernel mode stack ; 2. STATUS32.Z flag set if in U mode at time of interrupt (U:1,K:0) ; 3. Auto save: (mandatory) Push PC and STAT32 on stack ; hardware does even if CONFIG_ARC_IRQ_NO_AUTOSAVE - ; 4. Auto save: (optional) r0-r11, blink, LPE,LPS,LPC, JLI,LDI,EI + ; 4a. Auto save: (optional) r0-r11, blink, LPE,LPS,LPC, JLI,LDI,EI ; - ; (B) Manually saved some regs: r12,r30, sp,fp,gp, ACCL pair + ; Now + ; 4b. If Auto-save (optional) not enabled in hw, manually save them + ; 5. Manually save: r12,r30, sp,fp,gp, ACCL pair + ; + ; At the end, SP points to pt_regs #ifdef CONFIG_ARC_IRQ_NO_AUTOSAVE ; carve pt_regs on stack (case #3), PC/STAT32 already on stack @@ -73,13 +77,14 @@ /*------------------------------------------------------------------------*/ .macro EXCEPTION_PROLOGUE - ; (A) Before jumping to Exception Vector, hardware micro-ops did following: + ; Before jumping to Exception Vector, hardware micro-ops did following: ; 1. SP auto-switched to kernel mode stack ; 2. STATUS32.Z flag set if in U mode at time of exception (U:1,K:0) ; - ; (B) Manually save the complete reg file below + ; Now manually save rest of reg file + ; At the end, SP points to pt_regs - sub sp, sp, SZ_PT_REGS ; carve pt_regs + sub sp, sp, SZ_PT_REGS ; carve space for pt_regs ; _HARD saves r10 clobbered by _SOFT as scratch hence comes first @@ -136,8 +141,8 @@ ST2 gp, fp, PT_r26 ; gp (r26), fp (r27) - st r12, [sp, PT_sp + 4] - st r30, [sp, PT_sp + 8] + st r12, [sp, PT_r12] + st r30, [sp, PT_r30] ; Saving pt_regs->sp correctly requires some extra work due to the way ; Auto stack switch works @@ -244,7 +249,7 @@ btst r0, STATUS_U_BIT ; Z flag set if K, used in restoring SP - ld r10, [sp, PT_event + 4] + ld r10, [sp, PT_bta] sr r10, [erbta] LD2 r10, r11, PT_ret diff --git a/arch/arc/include/asm/entry-compact.h b/arch/arc/include/asm/entry-compact.h index e3383e1cb040..4e2ae82779ed 100644 --- a/arch/arc/include/asm/entry-compact.h +++ b/arch/arc/include/asm/entry-compact.h @@ -170,12 +170,13 @@ PUSHAX erbta lr r10, [ecr] - st r10, [sp, PT_event] /* EV_Trap expects r10 to have ECR */ + st r10, [sp, PT_event] #ifdef CONFIG_ARC_CURR_IN_REG /* gp already saved on stack: now load with "current" */ GET_CURR_TASK_ON_CPU gp #endif + ; OUTPUT: r10 has ECR expected by EV_Trap .endm /*-------------------------------------------------------------- diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h index e9798f46cdc4..2bf8ea96ea21 100644 --- a/arch/arc/include/asm/ptrace.h +++ b/arch/arc/include/asm/ptrace.h @@ -75,7 +75,7 @@ struct pt_regs { unsigned long event; }; - unsigned long bta; /* bta_l1, bta_l2, erbta */ + unsigned long bta; /* erbta */ unsigned long r26; /* gp */ unsigned long fp; |