Go to the documentation of this file.
23 #ifndef _ASM_POWERPC_PTRACE_H
24 #define _ASM_POWERPC_PTRACE_H
26 #include <uapi/asm/ptrace.h>
31 #define STACK_FRAME_OVERHEAD 112
32 #define STACK_FRAME_LR_SAVE 2
33 #define STACK_FRAME_REGS_MARKER ASM_CONST(0x7265677368657265)
34 #define STACK_INT_FRAME_SIZE (sizeof(struct pt_regs) + \
35 STACK_FRAME_OVERHEAD + 288)
36 #define STACK_FRAME_MARKER 12
39 #define __SIGNAL_FRAMESIZE 128
40 #define __SIGNAL_FRAMESIZE32 64
44 #define STACK_FRAME_OVERHEAD 16
45 #define STACK_FRAME_LR_SAVE 1
46 #define STACK_FRAME_REGS_MARKER ASM_CONST(0x72656773)
47 #define STACK_INT_FRAME_SIZE (sizeof(struct pt_regs) + STACK_FRAME_OVERHEAD)
48 #define STACK_FRAME_MARKER 2
51 #define __SIGNAL_FRAMESIZE 64
57 #define GET_IP(regs) ((regs)->nip)
58 #define GET_USP(regs) ((regs)->gpr[1])
59 #define GET_FP(regs) (0)
60 #define SET_FP(regs, val)
64 #define profile_pc profile_pc
69 #define kernel_stack_pointer(regs) ((regs)->gpr[1])
72 return !(regs->
ccr & 0x10000000);
75 static inline long regs_return_value(
struct pt_regs *
regs)
84 #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1)
86 #define user_mode(regs) (((regs)->msr & MSR_PR) != 0)
89 #define force_successful_syscall_return() \
91 set_thread_flag(TIF_NOERROR); \
99 #define current_pt_regs() \
100 ((struct pt_regs *)((unsigned long)current_thread_info() + THREAD_SIZE) - 1)
108 #define FULL_REGS(regs) (((regs)->trap & 1) == 0)
109 #ifndef __powerpc64__
110 #define IS_CRITICAL_EXC(regs) (((regs)->trap & 2) != 0)
111 #define IS_MCHECK_EXC(regs) (((regs)->trap & 4) != 0)
112 #define IS_DEBUG_EXC(regs) (((regs)->trap & 8) != 0)
114 #define TRAP(regs) ((regs)->trap & ~0xF)
116 #define NV_REG_POISON 0xdeadbeefdeadbeefUL
117 #define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1)
119 #define NV_REG_POISON 0xdeadbeef
120 #define CHECK_FULL_REGS(regs) \
122 if ((regs)->trap & 1) \
123 printk(KERN_CRIT "%s: partial register set\n", __func__); \
127 #define arch_has_single_step() (1)
128 #define arch_has_block_step() (!cpu_has_feature(CPU_FTR_601))
129 #define ARCH_HAS_USER_SINGLE_STEP_INFO
135 #include <linux/stddef.h>
139 #define MAX_REG_OFFSET (offsetof(struct pt_regs, dsisr))
150 static inline unsigned long regs_get_register(
struct pt_regs *regs,
155 return *(
unsigned long *)((
unsigned long)regs +
offset);
196 #ifndef __powerpc64__
198 #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1)
199 #define PT_VR0_32 164
200 #define PT_VSCR_32 (PT_VR0 + 32*4 + 3)
201 #define PT_VRSAVE_32 (PT_VR0 + 33*4)
202 #define PT_VSR0_32 300