diff options
author | David Howells <dhowells@redhat.com> | 2006-07-10 07:44:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-10 16:24:22 -0400 |
commit | 84e8cd6dbc00b4979e8d1c15c80d91987aeb3417 (patch) | |
tree | 5df8103b5e6d414bc39e165655ae8bd5341abd76 /include/asm-frv/ptrace.h | |
parent | 6d8c4e3b0150ff537902477ed62f8a8e9e70007b (diff) |
[PATCH] FRV: Introduce asm-offsets for FRV arch
Introduce the use of asm-offsets into the FRV architecture.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-frv/ptrace.h')
-rw-r--r-- | include/asm-frv/ptrace.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/include/asm-frv/ptrace.h b/include/asm-frv/ptrace.h index b2cce0718e57..7ff525162a72 100644 --- a/include/asm-frv/ptrace.h +++ b/include/asm-frv/ptrace.h | |||
@@ -62,18 +62,10 @@ | |||
62 | #ifndef __ASSEMBLY__ | 62 | #ifndef __ASSEMBLY__ |
63 | 63 | ||
64 | /* | 64 | /* |
65 | * dedicate GR28; to keeping the a pointer to the current exception frame | 65 | * we dedicate GR28 to keeping a pointer to the current exception frame |
66 | * - gr28 is destroyed on entry to the kernel from userspace | ||
66 | */ | 67 | */ |
67 | register struct pt_regs *__frame asm("gr28"); | 68 | register struct pt_regs *__frame asm("gr28"); |
68 | register struct pt_regs *__debug_frame asm("gr31"); | ||
69 | |||
70 | #ifndef container_of | ||
71 | #define container_of(ptr, type, member) ({ \ | ||
72 | const typeof( ((type *)0)->member ) *__mptr = (ptr); \ | ||
73 | (type *)( (char *)__mptr - offsetof(type,member) );}) | ||
74 | #endif | ||
75 | |||
76 | #define __debug_regs container_of(__debug_frame, struct pt_debug_regs, normal_regs) | ||
77 | 69 | ||
78 | #define user_mode(regs) (!((regs)->psr & PSR_S)) | 70 | #define user_mode(regs) (!((regs)->psr & PSR_S)) |
79 | #define instruction_pointer(regs) ((regs)->pc) | 71 | #define instruction_pointer(regs) ((regs)->pc) |