summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/traps.h
diff options
context:
space:
mode:
authorJulien Thierry <julien.thierry@arm.com>2017-10-25 11:04:33 +0200
committerWill Deacon <will.deacon@arm.com>2017-10-25 12:57:33 +0200
commit6436beeee5721a8e906e9eabf866f12d04470437 (patch)
tree022956462f870882d483fe09492a0c2f679d61eb /arch/arm64/include/asm/traps.h
parentarm64: Use existing defines for mdscr (diff)
downloadlinux-6436beeee5721a8e906e9eabf866f12d04470437.tar.xz
linux-6436beeee5721a8e906e9eabf866f12d04470437.zip
arm64: Fix single stepping in kernel traps
Software Step exception is missing after stepping a trapped instruction. Ensure SPSR.SS gets set to 0 after emulating/skipping a trapped instruction before doing ERET. Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Julien Thierry <julien.thierry@arm.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> [will: replaced AARCH32_INSN_SIZE with 4] Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/traps.h')
-rw-r--r--arch/arm64/include/asm/traps.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/traps.h b/arch/arm64/include/asm/traps.h
index d131501c6222..45e3da34bdc4 100644
--- a/arch/arm64/include/asm/traps.h
+++ b/arch/arm64/include/asm/traps.h
@@ -37,6 +37,12 @@ void unregister_undef_hook(struct undef_hook *hook);
void arm64_notify_segfault(struct pt_regs *regs, unsigned long addr);
+/*
+ * Move regs->pc to next instruction and do necessary setup before it
+ * is executed.
+ */
+void arm64_skip_faulting_instruction(struct pt_regs *regs, unsigned long size);
+
static inline int __in_irqentry_text(unsigned long ptr)
{
return ptr >= (unsigned long)&__irqentry_text_start &&