X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-ppc64%2Fptrace.h;h=c96aad28fc081fc721d8c66fbca460864f1ea7b5;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=1b5b1bac4441003797f0711a95222368701afe9d;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/asm-ppc64/ptrace.h b/include/asm-ppc64/ptrace.h index 1b5b1bac4..c96aad28f 100644 --- a/include/asm-ppc64/ptrace.h +++ b/include/asm-ppc64/ptrace.h @@ -60,17 +60,35 @@ struct pt_regs32 { PPC_REG_32 result; /* Result of a system call */ }; +#define instruction_pointer(regs) ((regs)->nip) +#ifdef CONFIG_SMP +extern unsigned long profile_pc(struct pt_regs *regs); +#else +#define profile_pc(regs) instruction_pointer(regs) #endif +#endif /* __ASSEMBLY__ */ + #define STACK_FRAME_OVERHEAD 112 /* size of minimum stack frame */ /* Size of dummy stack frame allocated when calling signal handler. */ #define __SIGNAL_FRAMESIZE 128 #define __SIGNAL_FRAMESIZE32 64 -#define instruction_pointer(regs) ((regs)->nip) #define user_mode(regs) ((((regs)->msr) >> MSR_PR_LG) & 0x1) +#define force_successful_syscall_return() \ + (current_thread_info()->syscall_noerror = 1) + +/* + * We use the least-significant bit of the trap field to indicate + * whether we have saved the full set of registers, or only a + * partial set. A 1 there means the partial set. + */ +#define FULL_REGS(regs) (((regs)->trap & 1) == 0) +#define TRAP(regs) ((regs)->trap & ~0xF) +#define CHECK_FULL_REGS(regs) BUG_ON(regs->trap & 1) + /* * Offsets used by 'ptrace' system call interface. */ @@ -124,7 +142,7 @@ struct pt_regs32 { /* Kernel and userspace will both use this PT_FPSCR value. 32-bit apps will have * visibility to the asm-ppc/ptrace.h header instead of this one. */ -#define PT_FPSCR (PT_FPR0 + 32 + 1) /* each FP reg occupies 1 slot in 64-bit space */ +#define PT_FPSCR (PT_FPR0 + 32) /* each FP reg occupies 1 slot in 64-bit space */ #ifdef __KERNEL__ #define PT_FPSCR32 (PT_FPR0 + 2*32 + 1) /* each FP reg occupies 2 32-bit userspace slots */