X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-frv%2Fptrace.h;fp=include%2Fasm-frv%2Fptrace.h;h=b2cce0718e57051dee812347a956c5608a5d06f7;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=7ff525162a723b8a2549db3534289a355ed54df8;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h index 7ff525162..b2cce0718 100644 --- a/include/asm-frv/ptrace.h +++ b/include/asm-frv/ptrace.h @@ -62,10 +62,18 @@ #ifndef __ASSEMBLY__ /* - * we dedicate GR28 to keeping a pointer to the current exception frame - * - gr28 is destroyed on entry to the kernel from userspace + * dedicate GR28; to keeping the a pointer to the current exception frame */ register struct pt_regs *__frame asm("gr28"); +register struct pt_regs *__debug_frame asm("gr31"); + +#ifndef container_of +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) +#endif + +#define __debug_regs container_of(__debug_frame, struct pt_debug_regs, normal_regs) #define user_mode(regs) (!((regs)->psr & PSR_S)) #define instruction_pointer(regs) ((regs)->pc)