summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/arcregs.h
diff options
context:
space:
mode:
authorVineet Gupta2013-06-11 15:26:54 +0200
committerVineet Gupta2013-06-26 10:34:48 +0200
commit502a0c775c7f0a01065e0d078e06c0440b86a11a (patch)
treedf280c7ba4533c0d6fddcd3985f4da3cd6a68dd8 /arch/arc/include/asm/arcregs.h
parentARC: stop using pt_regs->orig_r8 (diff)
downloadkernel-qcow2-linux-502a0c775c7f0a01065e0d078e06c0440b86a11a.tar.gz
kernel-qcow2-linux-502a0c775c7f0a01065e0d078e06c0440b86a11a.tar.xz
kernel-qcow2-linux-502a0c775c7f0a01065e0d078e06c0440b86a11a.zip
ARC: pt_regs update #5: Use real ECR for pt_regs->event vs. synth values
pt_regs->event was set with artificial values to identify the low level system event (syscall trap / breakpoint trap / exceptions / interrupts) With r8 saving out of the way, the full word can be used to save real ECR (Exception Cause Register) which helps idenify the event naturally, including additional info such as cause code, param. Only for Interrupts, where ECR is not applicable, do we resort to synthetic non ECR values. SAVE_ALL_TRAP/EXCEPTIONS can now be merged as they both use ECR with different runtime values. The ptrace helpers now use the sub-fields of ECR to distinguish the events (e.g. vector 0x25 is trap, param 0 is syscall...) The following benefits will follow: (1) This centralizes the location of where ECR is saved and will allow the cleanup of task->thread.cause_code ECR placeholder which is set in non-uniform way. Then ARC VM code can safely rely on it being there for purpose of finer grained VM_EXEC dcache flush (based on exec fault: I-TLB Miss) (2) Further, ECR being passed around from low level handlers as arg can be eliminated as it is part of standard reg-file in pt_regs Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include/asm/arcregs.h')
-rw-r--r--arch/arc/include/asm/arcregs.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h
index 122e9af46824..355cb470c2a4 100644
--- a/arch/arc/include/asm/arcregs.h
+++ b/arch/arc/include/asm/arcregs.h
@@ -60,6 +60,7 @@
#define ECR_V_ITLB_MISS 0x21
#define ECR_V_DTLB_MISS 0x22
#define ECR_V_PROTV 0x23
+#define ECR_V_TRAP 0x25
/* Protection Violation Exception Cause Code Values */
#define ECR_C_PROTV_INST_FETCH 0x00
@@ -77,6 +78,9 @@
#define ECR_C_BIT_DTLB_LD_MISS 8
#define ECR_C_BIT_DTLB_ST_MISS 9
+/* Dummy ECR values for Interrupts */
+#define event_IRQ1 0x0031abcd
+#define event_IRQ2 0x0032abcd
/* Auxiliary registers */
#define AUX_IDENTITY 4