]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/h8300/include/asm/ptrace.h
Merge branch 'for-3.13/logitech' into for-next
[karo-tx-linux.git] / arch / h8300 / include / asm / ptrace.h
1 #ifndef _H8300_PTRACE_H
2 #define _H8300_PTRACE_H
3
4 #include <uapi/asm/ptrace.h>
5
6 #ifndef __ASSEMBLY__
7 #if defined(CONFIG_CPU_H8S)
8 #endif
9 #ifndef PS_S
10 #define PS_S  (0x10)
11 #endif
12
13 #if defined(__H8300H__)
14 #define H8300_REGS_NO 11
15 #endif
16 #if defined(__H8300S__)
17 #define H8300_REGS_NO 12
18 #endif
19
20 /* Find the stack offset for a register, relative to thread.esp0. */
21 #define PT_REG(reg)     ((long)&((struct pt_regs *)0)->reg)
22
23 #define arch_has_single_step()  (1)
24
25 #define user_mode(regs) (!((regs)->ccr & PS_S))
26 #define instruction_pointer(regs) ((regs)->pc)
27 #define profile_pc(regs) instruction_pointer(regs)
28 #define current_pt_regs() ((struct pt_regs *) \
29         (THREAD_SIZE + (unsigned long)current_thread_info()) - 1)
30 #define signal_pt_regs() ((struct pt_regs *)current->thread.esp0)
31 #define current_user_stack_pointer() rdusp()
32 #endif /* __ASSEMBLY__ */
33 #endif /* _H8300_PTRACE_H */