diff options
| author | Richard Kuo <rkuo@codeaurora.org> | 2013-03-07 13:03:10 -0500 |
|---|---|---|
| committer | Richard Kuo <rkuo@codeaurora.org> | 2013-04-30 20:40:25 -0400 |
| commit | 7777746c40876834c1527689336e43c8381b1921 (patch) | |
| tree | b3257768e29db418ab9292a4e9a27c56e1e88fed /arch/hexagon/include/uapi | |
| parent | f8722a4d5243e779d6795e2d775c9114c44a6c26 (diff) | |
Hexagon: add support for single-stepping (v4+)
Hardware single-step is only available on v4 and later
architectures.
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Diffstat (limited to 'arch/hexagon/include/uapi')
| -rw-r--r-- | arch/hexagon/include/uapi/asm/ptrace.h | 5 | ||||
| -rw-r--r-- | arch/hexagon/include/uapi/asm/registers.h | 3 |
2 files changed, 8 insertions, 0 deletions
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); | |||
| 36 | ((struct pt_regs *) \ | 36 | ((struct pt_regs *) \ |
| 37 | ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) | 37 | ((unsigned long)current_thread_info() + THREAD_SIZE) - 1) |
| 38 | 38 | ||
| 39 | #if CONFIG_HEXAGON_ARCH_VERSION >= 4 | ||
| 40 | #define arch_has_single_step() (1) | ||
| 41 | #endif | ||
| 42 | |||
| 43 | |||
| 39 | #endif | 44 | #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 { | |||
| 211 | #define pt_psp(regs) ((regs)->hvmer.vmpsp) | 211 | #define pt_psp(regs) ((regs)->hvmer.vmpsp) |
| 212 | #define pt_badva(regs) ((regs)->hvmer.vmbadva) | 212 | #define pt_badva(regs) ((regs)->hvmer.vmbadva) |
| 213 | 213 | ||
| 214 | #define pt_set_singlestep(regs) ((regs)->hvmer.vmest |= (1<<HVM_VMEST_SS_SFT)) | ||
| 215 | #define pt_clr_singlestep(regs) ((regs)->hvmer.vmest &= ~(1<<HVM_VMEST_SS_SFT)) | ||
| 216 | |||
| 214 | #define pt_set_rte_sp(regs, sp) do {\ | 217 | #define pt_set_rte_sp(regs, sp) do {\ |
| 215 | pt_psp(regs) = (sp);\ | 218 | pt_psp(regs) = (sp);\ |
| 216 | (regs)->SP = (unsigned long) &((regs)->hvmer);\ | 219 | (regs)->SP = (unsigned long) &((regs)->hvmer);\ |
