summaryrefslogtreecommitdiffstats
path: root/arch/arc/include/asm/ptrace.h
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-01-23 12:00:36 +0100
committerVineet Gupta <vgupta@synopsys.com>2013-02-15 18:46:06 +0100
commit2e651ea1596b0ee25af4fcdc4cd13cbb33ffc254 (patch)
tree51210f1cd80327a00e2fd4b0d20849b6329925d6 /arch/arc/include/asm/ptrace.h
parentsysctl: Enable PARISC "unaligned-trap" to be used cross-arch (diff)
downloadlinux-2e651ea1596b0ee25af4fcdc4cd13cbb33ffc254.tar.xz
linux-2e651ea1596b0ee25af4fcdc4cd13cbb33ffc254.zip
ARC: Unaligned access emulation
ARC700 doesn't natively support unaligned access, but can be emulated -Unaligned Access Exception -Disassembly at the Fault address to find the exact insn (long/short) Also per Arnd's comment, we runtime control it using 2 sysctl knobs: * SYSCTL_ARCH_UNALIGN_ALLOW: Runtime enable/disble * SYSCTL_ARCH_UNALIGN_NO_WARN: Warn on each emulation attempt Originally contributed by Tim Yao <tim.yao@amlogic.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Tim Yao <tim.yao@amlogic.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arc/include/asm/ptrace.h')
-rw-r--r--arch/arc/include/asm/ptrace.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arc/include/asm/ptrace.h b/arch/arc/include/asm/ptrace.h
index 063ed0040ef7..df5b95213776 100644
--- a/arch/arc/include/asm/ptrace.h
+++ b/arch/arc/include/asm/ptrace.h
@@ -97,6 +97,9 @@ struct callee_regs {
sp; \
})
+/* return 1 if PC in delay slot */
+#define delay_mode(regs) ((regs->status32 & STATUS_DE_MASK) == STATUS_DE_MASK)
+
#define in_syscall(regs) (regs->event & orig_r8_IS_SCALL)
#define in_brkpt_trap(regs) (regs->event & orig_r8_IS_BRKPT)