From 7777746c40876834c1527689336e43c8381b1921 Mon Sep 17 00:00:00 2001 From: Richard Kuo Date: Thu, 7 Mar 2013 12:03:10 -0600 Subject: Hexagon: add support for single-stepping (v4+) Hardware single-step is only available on v4 and later architectures. Signed-off-by: Richard Kuo --- arch/hexagon/include/uapi/asm/ptrace.h | 5 +++++ arch/hexagon/include/uapi/asm/registers.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'arch/hexagon/include') diff --git a/arch/hexagon/include/uapi/asm/ptrace.h b/arch/hexagon/include/uapi/asm/ptrace.h index 1ffce0c6ee07..065e5b32313f 100644 --- a/arch/hexagon/include/uapi/asm/ptrace.h +++ b/arch/hexagon/include/uapi/asm/ptrace.h @@ -36,4 +36,9 @@ extern const char *regs_query_register_name(unsigned int offset); ((struct pt_regs *) \ ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) +#if CONFIG_HEXAGON_ARCH_VERSION >= 4 +#define arch_has_single_step() (1) +#endif + + #endif diff --git a/arch/hexagon/include/uapi/asm/registers.h b/arch/hexagon/include/uapi/asm/registers.h index 80504155ca3a..fcdb5f96a984 100644 --- a/arch/hexagon/include/uapi/asm/registers.h +++ b/arch/hexagon/include/uapi/asm/registers.h @@ -211,6 +211,9 @@ struct pt_regs { #define pt_psp(regs) ((regs)->hvmer.vmpsp) #define pt_badva(regs) ((regs)->hvmer.vmbadva) +#define pt_set_singlestep(regs) ((regs)->hvmer.vmest |= (1<hvmer.vmest &= ~(1<SP = (unsigned long) &((regs)->hvmer);\ -- cgit v1.2.3